diff --git a/deps/oblib/src/lib/utility/ob_tracepoint.h b/deps/oblib/src/lib/utility/ob_tracepoint.h index 18f5a1df8..745bf44f3 100644 --- a/deps/oblib/src/lib/utility/ob_tracepoint.h +++ b/deps/oblib/src/lib/utility/ob_tracepoint.h @@ -706,6 +706,7 @@ class EventTable EN_RESTORE_TABLET_TASK_FAILED = 1113, EN_INSERT_USER_RECOVER_JOB_FAILED = 1114, EN_INSERT_AUX_TENANT_RESTORE_JOB_FAILED = 1115, + EN_RESTORE_CREATE_LS_FAILED = 1116, // END OF STORAGE HA - 1101 - 2000 // sql parameterization 1170-1180 diff --git a/src/rootserver/restore/ob_restore_scheduler.cpp b/src/rootserver/restore/ob_restore_scheduler.cpp index 5c537e7da..40b1465e6 100644 --- a/src/rootserver/restore/ob_restore_scheduler.cpp +++ b/src/rootserver/restore/ob_restore_scheduler.cpp @@ -1054,7 +1054,20 @@ int ObRestoreScheduler::restore_init_ls(const share::ObPhysicalRestoreJob &job_i LOG_WARN("failed to add log restore source", KR(ret), K(job_info), K(log_path_array)); } } - if (OB_SUCC(ret)) { + +#ifdef ERRSIM + ret = OB_E(EventTable::EN_RESTORE_CREATE_LS_FAILED) OB_SUCCESS; +#endif + + TenantRestoreStatus tenant_restore_status; + if (OB_FAIL(ret)) { + int tmp_ret = OB_SUCCESS; + if (OB_TMP_FAIL(check_all_ls_restore_to_consistent_scn_finish_(tenant_id_, tenant_restore_status))) { + LOG_WARN("failed to check all ls restore to consistent scn finish", K(ret)); + } + } + + if (OB_SUCC(ret) || is_tenant_restore_failed(tenant_restore_status)) { int tmp_ret = OB_SUCCESS; if (OB_SUCCESS != (tmp_ret = try_update_job_status(*sql_proxy_, ret, job_info))) { tmp_ret = OB_SUCC(ret) ? tmp_ret : ret;