diff --git a/mittest/logservice/test_ob_simple_log_arb.cpp b/mittest/logservice/test_ob_simple_log_arb.cpp index 1d85f14eb5..ad0f6797d6 100644 --- a/mittest/logservice/test_ob_simple_log_arb.cpp +++ b/mittest/logservice/test_ob_simple_log_arb.cpp @@ -538,11 +538,11 @@ using namespace palflite; TEST_F(TestObSimpleLogClusterArbService, test_multi_meta_block) { - SET_CASE_LOG_FILE(TEST_NAME, "test_2f1a_defensive"); - OB_LOGGER.set_log_level("DEBUG"); + SET_CASE_LOG_FILE(TEST_NAME, "test_mutli_meta_block"); + OB_LOGGER.set_log_level("INFO"); MockLocCB loc_cb; int ret = OB_SUCCESS; - PALF_LOG(INFO, "begin test_2f1a_defensive"); + PALF_LOG(INFO, "begin test_multi_meta_block"); int64_t leader_idx = 0; int64_t arb_replica_idx = -1; PalfHandleImplGuard leader; @@ -635,7 +635,7 @@ TEST_F(TestObSimpleLogClusterArbService, test_multi_meta_block) } } delete_paxos_group(id); - PALF_LOG(INFO, "end test_2f1a_defensive", K(id)); + PALF_LOG(INFO, "end test_mutli_meta_block", K(id)); } // 1. 2F1A, the leader starts to degrade another F diff --git a/src/logservice/ob_log_handler.h b/src/logservice/ob_log_handler.h index c91420e473..4fe32859bd 100644 --- a/src/logservice/ob_log_handler.h +++ b/src/logservice/ob_log_handler.h @@ -277,6 +277,7 @@ public: // - OB_INVALID_ARGUMENT // - OB_ENTRY_NOT_EXIST: there is no log in disk // - OB_ERR_OUT_OF_LOWER_BOUND: scn is too old, log files may have been recycled + // - OB_NEED_RETRY: the block is being flashback, need retry. // - others: bug int locate_by_scn_coarsely(const share::SCN &scn, palf::LSN &result_lsn) override final; @@ -288,6 +289,7 @@ public: // - OB_SUCCESS; locate_by_lsn_coarsely success // - OB_INVALID_ARGUMENT // - OB_ERR_OUT_OF_LOWER_BOUND: lsn is too small, log files may have been recycled + // - OB_NEED_RETRY: the block is being flashback, need retry. // - others: bug int locate_by_lsn_coarsely(const palf::LSN &lsn, share::SCN &result_scn) override final; // @brief, set the recycable lsn, palf will ensure that the data before recycable lsn readable. diff --git a/src/logservice/palf/palf_handle_impl.h b/src/logservice/palf/palf_handle_impl.h index abac517116..34ca501cb4 100755 --- a/src/logservice/palf/palf_handle_impl.h +++ b/src/logservice/palf/palf_handle_impl.h @@ -466,6 +466,7 @@ public: // - OB_INVALID_ARGUMENT // - OB_ENTRY_NOT_EXIST: there is no log in disk // - OB_ERR_OUT_OF_LOWER_BOUND: scn is too old, log files may have been recycled + // - OB_NEED_RETRY: the block is being flashback, need retry. // - others: bug virtual int locate_by_scn_coarsely(const share::SCN &scn, LSN &result_lsn) = 0; @@ -482,6 +483,7 @@ public: // - OB_SUCCESS; locate_by_lsn_coarsely success // - OB_INVALID_ARGUMENT // - OB_ERR_OUT_OF_LOWER_BOUND: lsn is too small, log files may have been recycled + // - OB_NEED_RETRY: the block is being flashback, need retry. // - others: bug virtual int locate_by_lsn_coarsely(const LSN &lsn, share::SCN &result_scn) = 0; virtual int get_begin_lsn(LSN &lsn) const = 0; diff --git a/src/storage/checkpoint/ob_checkpoint_executor.cpp b/src/storage/checkpoint/ob_checkpoint_executor.cpp index 9f85c3ebdd..f2bc869f45 100644 --- a/src/storage/checkpoint/ob_checkpoint_executor.cpp +++ b/src/storage/checkpoint/ob_checkpoint_executor.cpp @@ -171,6 +171,9 @@ int ObCheckpointExecutor::update_clog_checkpoint() } else if (OB_NOT_INIT == ret) { STORAGE_LOG(WARN, "palf has been disabled", K(ret), K(checkpoint_scn), K(ls_->get_ls_id())); ret = OB_SUCCESS; + } else if (OB_NEED_RETRY == ret) { + STORAGE_LOG(WARN, "locate_by_scn_coarsely need retry", K(checkpoint_scn), K(ls_->get_ls_id())); + ret = OB_SUCCESS; } else { STORAGE_LOG(ERROR, "locate lsn by logts failed", K(ret), K(ls_id), K(checkpoint_scn), K(checkpoint_scn_in_ls_meta));