From 1e7414d59a64d63c0b7141bf4a9557457c242abd Mon Sep 17 00:00:00 2001 From: godyangfight Date: Wed, 15 Feb 2023 02:40:38 +0000 Subject: [PATCH] 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 2c26de5d1..50e79e724 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 ce6a23aca..a7cc5e1e7 100644 --- a/src/storage/ls/ob_ls.cpp +++ b/src/storage/ls/ob_ls.cpp @@ -1090,7 +1090,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 9d26bc186..d43a46933 100644 --- a/src/storage/ls/ob_ls_tablet_service.cpp +++ b/src/storage/ls/ob_ls_tablet_service.cpp @@ -2830,7 +2830,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; -- GitLab