From 851f6655e8e8120a349c4f372c72bf0d317a350e Mon Sep 17 00:00:00 2001 From: obdev Date: Tue, 7 Mar 2023 05:41:10 +0000 Subject: [PATCH] fix compat bug about 2pc from 4.0 to 4.1 --- src/storage/tx/ob_tx_2pc_msg_handler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/storage/tx/ob_tx_2pc_msg_handler.cpp b/src/storage/tx/ob_tx_2pc_msg_handler.cpp index bd7a59a61..b8c16ae9d 100644 --- a/src/storage/tx/ob_tx_2pc_msg_handler.cpp +++ b/src/storage/tx/ob_tx_2pc_msg_handler.cpp @@ -586,8 +586,9 @@ int ObPartTransCtx::apply_2pc_msg_(const ObTwoPhaseCommitMsgType msg_type) } case ObTwoPhaseCommitMsgType::OB_MSG_TX_CLEAR_REQ: { const Ob2pcClearReqMsg &msg = *(static_cast(msg_2pc_cache_)); - if (msg.max_commit_log_scn_ < max_2pc_commit_scn_ - || msg.max_commit_log_scn_ < ctx_tx_data_.get_end_log_ts()) { + if (CLUSTER_VERSION_4_1_0_0 <= GET_MIN_CLUSTER_VERSION() + && (msg.max_commit_log_scn_ < max_2pc_commit_scn_ + || msg.max_commit_log_scn_ < ctx_tx_data_.get_end_log_ts())) { ret = OB_ERR_UNEXPECTED; TRANS_LOG(WARN, "unexpected max commit log scn in clear request", K(ret), KPC(this)); } else {