relax replay done condition in ls migration

This commit is contained in:
obdev 2022-11-04 02:10:29 +00:00 committed by wangzelin.wzl
parent 4afce61098
commit c1ff5dd3aa
2 changed files with 2 additions and 1 deletions

View File

@ -1010,7 +1010,7 @@ int ObStartCompleteMigrationTask::wait_log_replay_sync_()
STORAGE_LOG(WARN, "task is cancelled", K(ret), K(*this));
} else if (OB_FAIL(ls->get_max_decided_log_ts_ns(current_replay_log_ts_ns))) {
LOG_WARN("failed to get current replay log ts", K(ret), KPC(ctx_));
} else if (current_replay_log_ts_ns >= log_sync_scn_) {
} else if (current_replay_log_ts_ns + IS_REPLAY_DONE_THRESHOLD_NS >= log_sync_scn_) {
wait_log_replay_success = true;
const int64_t cost_ts = ObTimeUtility::current_time() - wait_replay_start_ts;
LOG_INFO("wait replay log ts ns success, stop wait", "arg", ctx_->arg_, K(cost_ts));

View File

@ -188,6 +188,7 @@ private:
int record_server_event_();
private:
static const int64_t IS_REPLAY_DONE_THRESHOLD_NS = 3L * 1000 * 1000 * 1000;
bool is_inited_;
ObLSHandle ls_handle_;
ObLSCompleteMigrationCtx *ctx_;