From 5bf59291e3dd2861af36420c875f3217cfdf5428 Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 11 Jul 2024 06:46:48 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0425=E5=9C=A8master=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/oblib/src/common/ob_version_def.h | 4 +++- src/share/ob_upgrade_utils.cpp | 3 +++ src/share/ob_upgrade_utils.h | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deps/oblib/src/common/ob_version_def.h b/deps/oblib/src/common/ob_version_def.h index e40b4e7ea5..c208ae7b5e 100644 --- a/deps/oblib/src/common/ob_version_def.h +++ b/deps/oblib/src/common/ob_version_def.h @@ -125,6 +125,7 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat #define MOCK_CLUSTER_VERSION_4_2_3_0 (oceanbase::common::cal_version(4, 2, 3, 0)) #define MOCK_CLUSTER_VERSION_4_2_3_1 (oceanbase::common::cal_version(4, 2, 3, 1)) #define MOCK_CLUSTER_VERSION_4_2_4_0 (oceanbase::common::cal_version(4, 2, 4, 0)) +#define MOCK_CLUSTER_VERSION_4_2_5_0 (oceanbase::common::cal_version(4, 2, 5, 0)) // new data version before 4.3 cannot upgrade to master, must add "MOCK_" prefix #define CLUSTER_VERSION_4_3_0_0 (oceanbase::common::cal_version(4, 3, 0, 0)) #define CLUSTER_VERSION_4_3_0_1 (oceanbase::common::cal_version(4, 3, 0, 1)) @@ -157,6 +158,7 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat #define MOCK_DATA_VERSION_4_2_3_0 (oceanbase::common::cal_version(4, 2, 3, 0)) #define MOCK_DATA_VERSION_4_2_3_1 (oceanbase::common::cal_version(4, 2, 3, 1)) #define MOCK_DATA_VERSION_4_2_4_0 (oceanbase::common::cal_version(4, 2, 4, 0)) +#define MOCK_DATA_VERSION_4_2_5_0 (oceanbase::common::cal_version(4, 2, 5, 0)) // new data version before 4.3 cannot upgrade to master, must add "MOCK_" prefix #define DATA_VERSION_4_3_0_0 (oceanbase::common::cal_version(4, 3, 0, 0)) #define DATA_VERSION_4_3_0_1 (oceanbase::common::cal_version(4, 3, 0, 1)) @@ -178,4 +180,4 @@ public: } // namespace common } // namespace oceanbase -#endif \ No newline at end of file +#endif diff --git a/src/share/ob_upgrade_utils.cpp b/src/share/ob_upgrade_utils.cpp index 5ce5f09eea..d536945385 100755 --- a/src/share/ob_upgrade_utils.cpp +++ b/src/share/ob_upgrade_utils.cpp @@ -52,6 +52,7 @@ const uint64_t ObUpgradeChecker::UPGRADE_PATH[] = { CALC_VERSION(4UL, 2UL, 3UL, 0UL), // 4.2.3.0 CALC_VERSION(4UL, 2UL, 3UL, 1UL), // 4.2.3.1 CALC_VERSION(4UL, 2UL, 4UL, 0UL), // 4.2.4.0 + CALC_VERSION(4UL, 2UL, 5UL, 0UL), // 4.2.5.0 CALC_VERSION(4UL, 3UL, 0UL, 0UL), // 4.3.0.0 CALC_VERSION(4UL, 3UL, 0UL, 1UL), // 4.3.0.1 CALC_VERSION(4UL, 3UL, 1UL, 0UL), // 4.3.1.0 @@ -83,6 +84,7 @@ int ObUpgradeChecker::get_data_version_by_cluster_version( CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(MOCK_CLUSTER_VERSION_4_2_3_0, MOCK_DATA_VERSION_4_2_3_0) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(MOCK_CLUSTER_VERSION_4_2_3_1, MOCK_DATA_VERSION_4_2_3_1) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(MOCK_CLUSTER_VERSION_4_2_4_0, MOCK_DATA_VERSION_4_2_4_0) + CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(MOCK_CLUSTER_VERSION_4_2_5_0, MOCK_DATA_VERSION_4_2_5_0) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_3_0_0, DATA_VERSION_4_3_0_0) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_3_0_1, DATA_VERSION_4_3_0_1) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_3_1_0, DATA_VERSION_4_3_1_0) @@ -661,6 +663,7 @@ int ObUpgradeProcesserSet::init( INIT_PROCESSOR_BY_VERSION(4, 2, 3, 0); INIT_PROCESSOR_BY_VERSION(4, 2, 3, 1); INIT_PROCESSOR_BY_VERSION(4, 2, 4, 0); + INIT_PROCESSOR_BY_VERSION(4, 2, 5, 0); INIT_PROCESSOR_BY_VERSION(4, 3, 0, 0); INIT_PROCESSOR_BY_VERSION(4, 3, 0, 1); INIT_PROCESSOR_BY_VERSION(4, 3, 1, 0); diff --git a/src/share/ob_upgrade_utils.h b/src/share/ob_upgrade_utils.h index ca7c4edaf9..7003864178 100755 --- a/src/share/ob_upgrade_utils.h +++ b/src/share/ob_upgrade_utils.h @@ -174,7 +174,7 @@ public: const uint64_t cluster_version, uint64_t &data_version); public: - static const int64_t DATA_VERSION_NUM = 18; + static const int64_t DATA_VERSION_NUM = 19; static const uint64_t UPGRADE_PATH[]; }; @@ -231,6 +231,7 @@ DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 2, 1) DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 3, 0) DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 3, 1) DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 4, 0) +DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 5, 0) DEF_SIMPLE_UPGRARD_PROCESSER(4, 3, 0, 0) DEF_SIMPLE_UPGRARD_PROCESSER(4, 3, 0, 1)