From 54cdbeeeb1eeb049be3c848c81788f0a85daed79 Mon Sep 17 00:00:00 2001 From: obdev Date: Tue, 25 Oct 2022 19:44:55 +0800 Subject: [PATCH] invoke sync_log_xx if the mt_ctx is partial_rollbacked --- src/storage/memtable/ob_memtable_context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/memtable/ob_memtable_context.cpp b/src/storage/memtable/ob_memtable_context.cpp index 2137250ff..b9ea8a53b 100644 --- a/src/storage/memtable/ob_memtable_context.cpp +++ b/src/storage/memtable/ob_memtable_context.cpp @@ -686,7 +686,7 @@ int ObMemtableCtx::sync_log_succ(const int64_t log_ts, const ObCallbackScope &ca { int ret = OB_SUCCESS; - if (OB_SUCCESS == ATOMIC_LOAD(&end_code_)) { + if (is_partial_rollbacked_() || OB_SUCCESS == ATOMIC_LOAD(&end_code_)) { if (OB_FAIL(log_gen_.sync_log_succ(log_ts, callbacks))) { TRANS_LOG(WARN, "sync log failed", K(ret)); } @@ -702,7 +702,7 @@ void ObMemtableCtx::sync_log_fail(const ObCallbackScope &callbacks) if (!callbacks.is_empty()) { set_partial_rollbacked_(); } - if (OB_SUCCESS == ATOMIC_LOAD(&end_code_)) { + if (is_partial_rollbacked_() || OB_SUCCESS == ATOMIC_LOAD(&end_code_)) { log_gen_.sync_log_fail(callbacks); } else { TRANS_LOG(INFO, "No memtable callbacks because of trans_end", K(end_code_), KPC(ctx_));