提交 fec30716 编写于 作者: O oceanoverflow 提交者: ob-robot

fix do not skip ddl replay task correctly

上级 5bb53151
......@@ -111,15 +111,7 @@ int ObDDLReplayExecutor::check_need_replay_ddl_inc_log_(
LOG_WARN("fail to check need replay", K(ret), KP(ls), K(tablet_handle));
} else if (!need_replay) {
// do nothing
} else if (tablet->get_tablet_meta().ha_status_.is_restore_status_empty()) {
ret = OB_EAGAIN;
need_replay = false;
(void) ls->get_ls_restore_handler()->try_record_one_tablet_to_restore(tablet->get_tablet_meta().tablet_id_);
if (REACH_COUNT_INTERVAL(1000L)) {
LOG_INFO("can not replay ddl log, need wait tablet restore status change to remote, prevent sstable array explosion",
K(tablet_handle), "tablet_meta", tablet->get_tablet_meta());
}
}else if (is_incremental_minor_direct_load(direct_load_type)) {
} else if (is_incremental_minor_direct_load(direct_load_type)) {
if (scn <= tablet->get_tablet_meta().clog_checkpoint_scn_) {
need_replay = false;
if (REACH_COUNT_INTERVAL(1000L)) {
......@@ -136,6 +128,17 @@ int ObDDLReplayExecutor::check_need_replay_ddl_inc_log_(
}
}
}
if (OB_SUCC(ret) && need_replay) {
if (tablet->get_tablet_meta().ha_status_.is_restore_status_empty()) {
ret = OB_EAGAIN;
need_replay = false;
(void) ls->get_ls_restore_handler()->try_record_one_tablet_to_restore(tablet->get_tablet_meta().tablet_id_);
if (REACH_COUNT_INTERVAL(1000L)) {
LOG_INFO("can not replay ddl log, need wait tablet restore status change to remote, prevent sstable array explosion",
K(tablet_handle), "tablet_meta", tablet->get_tablet_meta());
}
}
}
#ifdef ERRSIM
if (GCONF.errsim_tenant_id == MTL_ID() && tablet->get_tablet_meta().ha_status_.is_restore_status_remote()) {
if (REACH_COUNT_INTERVAL(10000L)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册