diff --git a/src/storage/ls/ob_ls.cpp b/src/storage/ls/ob_ls.cpp index ffd18f7820..63390b1eee 100644 --- a/src/storage/ls/ob_ls.cpp +++ b/src/storage/ls/ob_ls.cpp @@ -1230,6 +1230,10 @@ int ObLS::finish_slog_replay() // so skip the following steps, otherwise load_ls_inner_tablet maybe encounter error. } else if (OB_FAIL(start())) { LOG_WARN("ls can not start to work", K(ret)); + } else if (ObMigrationStatus::OB_MIGRATION_STATUS_REBUILD == new_migration_status) { + if (OB_FAIL(offline_())) { + LOG_WARN("failed to offline", K(ret), KPC(this)); + } } else if (is_enable_for_restore()) { if (OB_FAIL(offline_())) { LOG_WARN("failed to offline", K(ret), KPC(this)); diff --git a/src/storage/tx_storage/ob_ls_service.cpp b/src/storage/tx_storage/ob_ls_service.cpp index 4634c15360..3a0aa4d23b 100644 --- a/src/storage/tx_storage/ob_ls_service.cpp +++ b/src/storage/tx_storage/ob_ls_service.cpp @@ -689,6 +689,7 @@ int ObLSService::enable_replay() common::ObSharedGuard ls_iter; ObLS *ls = nullptr; share::ObLSRestoreStatus restore_status; + ObMigrationStatus migration_status = ObMigrationStatus::OB_MIGRATION_STATUS_MAX; if (OB_FAIL(get_ls_iter(ls_iter, ObLSGetMod::TXSTORAGE_MOD))) { LOG_WARN("failed to get ls iter", K(ret)); } else { @@ -702,6 +703,10 @@ int ObLSService::enable_replay() LOG_ERROR("ls is null", K(ret)); } else if (ls->is_need_gc()) { // this ls will be gc later, should not enable replay + } else if (OB_FAIL(ls->get_migration_status(migration_status))) { + LOG_WARN("failed to get ls migration status", K(ret)); + } else if (ObMigrationStatus::OB_MIGRATION_STATUS_REBUILD == migration_status) { + // ls will online in rebuild process } else if (OB_FAIL(ls->get_restore_status(restore_status))) { LOG_WARN("fail to get ls restore status", K(ret)); } else if (!restore_status.can_replay_log()) {