From 5bf5e1b1d40dd8df1392a74c8abbffff4e6a7d8b Mon Sep 17 00:00:00 2001 From: godyangfight Date: Wed, 15 Feb 2023 11:44:39 +0000 Subject: [PATCH] [CP] Fix ls rebuild failed and restart set ls migration status none bug --- src/storage/high_availability/ob_storage_ha_struct.cpp | 2 +- src/storage/ls/ob_ls.cpp | 2 +- src/storage/ls/ob_ls_tablet_service.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/high_availability/ob_storage_ha_struct.cpp b/src/storage/high_availability/ob_storage_ha_struct.cpp index 4802c08f58..052334c740 100644 --- a/src/storage/high_availability/ob_storage_ha_struct.cpp +++ b/src/storage/high_availability/ob_storage_ha_struct.cpp @@ -148,7 +148,7 @@ int ObMigrationStatusHelper::trans_fail_status(const ObMigrationStatus &cur_stat break; } case OB_MIGRATION_STATUS_REBUILD: { - fail_status = OB_MIGRATION_STATUS_NONE; + fail_status = OB_MIGRATION_STATUS_REBUILD; break; } case OB_MIGRATION_STATUS_CHANGE: { diff --git a/src/storage/ls/ob_ls.cpp b/src/storage/ls/ob_ls.cpp index 75d0ff94f6..a78bf1266a 100644 --- a/src/storage/ls/ob_ls.cpp +++ b/src/storage/ls/ob_ls.cpp @@ -1217,7 +1217,7 @@ int ObLS::finish_slog_replay() if (OB_FAIL(get_migration_status(current_migration_status))) { LOG_WARN("failed to get migration status", K(ret), KPC(this)); - } else if (OB_FAIL(ObMigrationStatusHelper::trans_fail_status(current_migration_status, + } else if (OB_FAIL(ObMigrationStatusHelper::trans_reboot_status(current_migration_status, new_migration_status))) { LOG_WARN("failed to trans fail status", K(ret), K(current_migration_status), K(new_migration_status)); diff --git a/src/storage/ls/ob_ls_tablet_service.cpp b/src/storage/ls/ob_ls_tablet_service.cpp index c514ac057f..43d04ef6d0 100644 --- a/src/storage/ls/ob_ls_tablet_service.cpp +++ b/src/storage/ls/ob_ls_tablet_service.cpp @@ -3127,7 +3127,7 @@ int ObLSTabletService::rebuild_create_tablet( OB_FAIL(migrate_update_tablet(mig_tablet_param))) { LOG_WARN("failed to rebuild create tablet", K(ret), K(tablet_id), K(mig_tablet_param)); } else if (b_exist && keep_old) { - if (OB_FAIL(check_and_get_tablet(tablet_id, old_tablet_handle))) { + if (OB_FAIL(check_and_get_tablet(tablet_id, old_tablet_handle, ObTabletCommon::NO_CHECK_GET_TABLET_TIMEOUT_US))) { LOG_WARN("failed to check and get tablet", K(ret), K(tablet_id)); } else if (OB_UNLIKELY(old_tablet_handle.get_obj()->get_tablet_meta().has_next_tablet_)) { ret = OB_ERR_UNEXPECTED;