[CP] check is ls restore failed when create ls failed.

This commit is contained in:
hamstersox 2023-10-11 13:09:55 +00:00 committed by ob-robot
parent 07082136a1
commit 7d90783c71
2 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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;