From 1bc5b4c658e7ca76a4869f9a06d6cb26a2a6d05b Mon Sep 17 00:00:00 2001 From: KyrielightWei Date: Wed, 17 Jul 2024 09:50:34 +0000 Subject: [PATCH] restore the ls state after failing to submit a start working log --- src/storage/tx/ob_trans_ctx_mgr_v4.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storage/tx/ob_trans_ctx_mgr_v4.cpp b/src/storage/tx/ob_trans_ctx_mgr_v4.cpp index aff99647a..7f84fe754 100644 --- a/src/storage/tx/ob_trans_ctx_mgr_v4.cpp +++ b/src/storage/tx/ob_trans_ctx_mgr_v4.cpp @@ -889,6 +889,7 @@ int ObLSTxCtxMgr::switch_to_follower_gracefully() TRANS_LOG(WARN, "switch state error", KR(ret), K(ls_id_), K(tx_ls_state_mgr_)); } else if (OB_TMP_FAIL(submit_start_working_log_())) { TRANS_LOG(WARN, "submit start working log failed", KR(tmp_ret), K(*this)); + tx_ls_state_mgr_.restore_tx_ls_state(); } if (OB_SUCCESS != tmp_ret) { ret = OB_LS_NEED_REVOKE;