From aa849cc00118390e5dd76cf37c5cd5cd63525e09 Mon Sep 17 00:00:00 2001 From: obdev Date: Mon, 31 Oct 2022 04:05:13 +0000 Subject: [PATCH] Fix migration copy tablet check tablet meta error --- src/storage/high_availability/ob_ls_migration.cpp | 12 +++++------- .../ob_storage_ha_tablet_builder.cpp | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/storage/high_availability/ob_ls_migration.cpp b/src/storage/high_availability/ob_ls_migration.cpp index 090180e9a2..8b27d77677 100644 --- a/src/storage/high_availability/ob_ls_migration.cpp +++ b/src/storage/high_availability/ob_ls_migration.cpp @@ -2106,13 +2106,11 @@ int ObTabletMigrationDag::inner_reset_status_for_retry() "ls_id", ctx->arg_.ls_id_.id(), "tablet_id", copy_tablet_ctx_.tablet_id_, "result", result, "retry_count", retry_count); - if (OB_SSTABLE_NOT_EXIST == result) { - if (OB_FAIL(ctx->ha_table_info_mgr_.remove_tablet_table_info(copy_tablet_ctx_.tablet_id_))) { - if (OB_HASH_NOT_EXIST == ret) { - ret = OB_SUCCESS; - } else { - LOG_WARN("failed to remove tablet info", K(ret), KPC(ctx), K(copy_tablet_ctx_)); - } + if (OB_FAIL(ctx->ha_table_info_mgr_.remove_tablet_table_info(copy_tablet_ctx_.tablet_id_))) { + if (OB_HASH_NOT_EXIST == ret) { + ret = OB_SUCCESS; + } else { + LOG_WARN("failed to remove tablet info", K(ret), KPC(ctx), K(copy_tablet_ctx_)); } } diff --git a/src/storage/high_availability/ob_storage_ha_tablet_builder.cpp b/src/storage/high_availability/ob_storage_ha_tablet_builder.cpp index b94261eb47..8f975d10b1 100644 --- a/src/storage/high_availability/ob_storage_ha_tablet_builder.cpp +++ b/src/storage/high_availability/ob_storage_ha_tablet_builder.cpp @@ -1459,8 +1459,8 @@ int ObStorageHATableInfoMgr::check_tablet_table_info_exist( } else { LOG_WARN("failed to get tablet table info mgr", K(ret), K(tablet_id)); } - } else { - is_exist = true; + } else if (OB_FAIL(tablet_table_info_mgr->check_copy_tablet_exist(is_exist))) { + LOG_WARN("failed to check copy tablet exist", K(ret), K(tablet_id)); } } return ret; -- GitLab