From 92b3d6058accb30d90e082170faa305ac45b85f9 Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 4 Jul 2024 08:55:29 +0000 Subject: [PATCH] fix add replica of same version observer when 4.3.0/4.3.1 upgrade to 4.3.2 --- mittest/mtlenv/storage/test_mds_compat.cpp | 2 +- src/storage/tablet/ob_tablet.cpp | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/mittest/mtlenv/storage/test_mds_compat.cpp b/mittest/mtlenv/storage/test_mds_compat.cpp index 156f1fb35..9cc7e09ec 100644 --- a/mittest/mtlenv/storage/test_mds_compat.cpp +++ b/mittest/mtlenv/storage/test_mds_compat.cpp @@ -355,7 +355,7 @@ TEST_F(TestMdsCompat, migration_param) ObMigrationTabletParam param; ret = tablet->build_migration_tablet_param(param); param.last_persisted_committed_tablet_status_.on_init(); - ASSERT_EQ(OB_NOT_SUPPORTED, ret); + ASSERT_EQ(OB_SUCCESS, ret); ASSERT_TRUE(param.is_valid()); // replace mds data in migration tablet param with our mocked mds data diff --git a/src/storage/tablet/ob_tablet.cpp b/src/storage/tablet/ob_tablet.cpp index a6dbda32e..7aa71b1f3 100644 --- a/src/storage/tablet/ob_tablet.cpp +++ b/src/storage/tablet/ob_tablet.cpp @@ -4911,7 +4911,6 @@ int ObTablet::build_migration_tablet_param( ObMigrationTabletParam &mig_tablet_param) const { int ret = OB_SUCCESS; - uint64_t data_version = 0; if (IS_NOT_INIT) { ret = OB_NOT_INIT; @@ -4953,11 +4952,6 @@ int ObTablet::build_migration_tablet_param( } if (OB_FAIL(ret)) { - } else if (OB_FAIL(GET_MIN_DATA_VERSION(MTL_ID(), data_version))) { - LOG_WARN("fail to get data version", K(ret)); - } else if (data_version < DATA_VERSION_4_3_2_0) { - ret = OB_NOT_SUPPORTED; - LOG_WARN("data version is less than 4.3.2, should not do migration", K(ret), K(data_version)); } else { mig_tablet_param.version_ = ObMigrationTabletParam::PARAM_VERSION_V3; mig_tablet_param.extra_medium_info_.info_ = tablet_meta_.extra_medium_info_.info_; @@ -4966,7 +4960,7 @@ int ObTablet::build_migration_tablet_param( LOG_WARN("fail to assign mig tablet param from tablet meta", K(ret), K(tablet_meta_.last_persisted_committed_tablet_status_)); } else { - LOG_INFO("mds data is deprecated under current data version", K(ret), K(data_version)); + LOG_INFO("build migration tablet param successfully", K(mig_tablet_param)); } } }