From 85496aecebb4e6398083194aee927755deed676c Mon Sep 17 00:00:00 2001 From: handora Date: Wed, 15 Sep 2021 16:43:46 +0800 Subject: [PATCH] add new cp to opensource --- src/storage/memtable/mvcc/ob_mvcc_trans_ctx.cpp | 3 ++- src/storage/transaction/ob_trans_part_ctx.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/storage/memtable/mvcc/ob_mvcc_trans_ctx.cpp b/src/storage/memtable/mvcc/ob_mvcc_trans_ctx.cpp index 4a6affb031..39fd6ae26f 100644 --- a/src/storage/memtable/mvcc/ob_mvcc_trans_ctx.cpp +++ b/src/storage/memtable/mvcc/ob_mvcc_trans_ctx.cpp @@ -1462,7 +1462,8 @@ int ObMvccRowCallback::clean_dirty_cb() { int ret = OB_SUCCESS; - if (marked_for_logging_) { + if (marked_for_logging_ || need_fill_redo_) { + // dirty callbacks unlink_trans_node(); dec_pending_cb_count(); marked_for_logging_ = false; diff --git a/src/storage/transaction/ob_trans_part_ctx.cpp b/src/storage/transaction/ob_trans_part_ctx.cpp index 72ff77c850..905458eeb2 100644 --- a/src/storage/transaction/ob_trans_part_ctx.cpp +++ b/src/storage/transaction/ob_trans_part_ctx.cpp @@ -7397,7 +7397,8 @@ int ObPartTransCtx::handle_2pc_prepare_request_raw_(int status) // The coordinator will retry on failure ret = OB_SUCCESS; } else if (OB_SUCCESS != get_status_() || OB_SUCCESS != status) { - if (OB_FAIL(alloc_local_trans_version_(OB_LOG_TRANS_REDO_WITH_PREPARE))) { + TRANS_LOG(WARN, "2pc prepare status not ok, write prepare-no", K(status), K(status_), K(*this)); + if (OB_FAIL(alloc_local_trans_version_(OB_LOG_TRANS_PREPARE))) { if (OB_EAGAIN != ret) { TRANS_LOG(WARN, "alloc log id and timestamp error", KR(ret), "context", *this); } else { -- GitLab