From c16546512e94287327f3e2e6ad738c744d83ebed Mon Sep 17 00:00:00 2001 From: tino247 Date: Wed, 2 Aug 2023 14:12:20 +0000 Subject: [PATCH] [UPGRADE] CP ver 4102 to master --- src/share/ob_cluster_version.h | 2 ++ src/share/ob_upgrade_utils.cpp | 3 +++ src/share/ob_upgrade_utils.h | 3 ++- tools/upgrade/oceanbase_upgrade_dep.yml | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/share/ob_cluster_version.h b/src/share/ob_cluster_version.h index d57a73aad..88f0c1aa1 100644 --- a/src/share/ob_cluster_version.h +++ b/src/share/ob_cluster_version.h @@ -167,6 +167,7 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat #define CLUSTER_VERSION_4_0_0_0 (oceanbase::common::cal_version(4, 0, 0, 0)) #define CLUSTER_VERSION_4_1_0_0 (oceanbase::common::cal_version(4, 1, 0, 0)) #define CLUSTER_VERSION_4_1_0_1 (oceanbase::common::cal_version(4, 1, 0, 1)) +#define CLUSTER_VERSION_4_1_0_2 (oceanbase::common::cal_version(4, 1, 0, 2)) #define CLUSTER_VERSION_4_2_0_0 (oceanbase::common::cal_version(4, 2, 0, 0)) //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //TODO: If you update the above version, please update CLUSTER_CURRENT_VERSION. @@ -182,6 +183,7 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat #define DATA_VERSION_4_0_0_0 (oceanbase::common::cal_version(4, 0, 0, 0)) #define DATA_VERSION_4_1_0_0 (oceanbase::common::cal_version(4, 1, 0, 0)) #define DATA_VERSION_4_1_0_1 (oceanbase::common::cal_version(4, 1, 0, 1)) +#define DATA_VERSION_4_1_0_2 (oceanbase::common::cal_version(4, 1, 0, 2)) #define DATA_VERSION_4_2_0_0 (oceanbase::common::cal_version(4, 2, 0, 0)) #define DATA_CURRENT_VERSION DATA_VERSION_4_2_0_0 diff --git a/src/share/ob_upgrade_utils.cpp b/src/share/ob_upgrade_utils.cpp index 1400ee2e1..4c5cb8ed8 100755 --- a/src/share/ob_upgrade_utils.cpp +++ b/src/share/ob_upgrade_utils.cpp @@ -41,6 +41,7 @@ const uint64_t ObUpgradeChecker::UPGRADE_PATH[DATA_VERSION_NUM] = { CALC_VERSION(4UL, 0UL, 0UL, 0UL), // 4.0.0.0 CALC_VERSION(4UL, 1UL, 0UL, 0UL), // 4.1.0.0 CALC_VERSION(4UL, 1UL, 0UL, 1UL), // 4.1.0.1 + CALC_VERSION(4UL, 1UL, 0UL, 2UL), // 4.1.0.2 CALC_VERSION(4UL, 2UL, 0UL, 0UL) // 4.2.0.0 }; @@ -58,6 +59,7 @@ int ObUpgradeChecker::get_data_version_by_cluster_version( CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_0_0_0, DATA_VERSION_4_0_0_0) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_1_0_0, DATA_VERSION_4_1_0_0) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_1_0_1, DATA_VERSION_4_1_0_1) + CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_1_0_2, DATA_VERSION_4_1_0_2) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_2_0_0, DATA_VERSION_4_2_0_0) #undef CONVERT_CLUSTER_VERSION_TO_DATA_VERSION default: { @@ -614,6 +616,7 @@ int ObUpgradeProcesserSet::init( INIT_PROCESSOR_BY_VERSION(4, 0, 0, 0); INIT_PROCESSOR_BY_VERSION(4, 1, 0, 0); INIT_PROCESSOR_BY_VERSION(4, 1, 0, 1); + INIT_PROCESSOR_BY_VERSION(4, 1, 0, 2); INIT_PROCESSOR_BY_VERSION(4, 2, 0, 0); #undef INIT_PROCESSOR_BY_VERSION inited_ = true; diff --git a/src/share/ob_upgrade_utils.h b/src/share/ob_upgrade_utils.h index cef7e79e9..a6982416f 100755 --- a/src/share/ob_upgrade_utils.h +++ b/src/share/ob_upgrade_utils.h @@ -170,7 +170,7 @@ public: const uint64_t cluster_version, uint64_t &data_version); public: - static const int64_t DATA_VERSION_NUM = 4; + static const int64_t DATA_VERSION_NUM = 5; static const uint64_t UPGRADE_PATH[DATA_VERSION_NUM]; }; @@ -194,6 +194,7 @@ private: }; DEF_SIMPLE_UPGRARD_PROCESSER(4, 1, 0, 1) +DEF_SIMPLE_UPGRARD_PROCESSER(4, 1, 0, 2) class ObUpgradeFor4200Processor : public ObBaseUpgradeProcessor { diff --git a/tools/upgrade/oceanbase_upgrade_dep.yml b/tools/upgrade/oceanbase_upgrade_dep.yml index f8115efb5..36f00aade 100644 --- a/tools/upgrade/oceanbase_upgrade_dep.yml +++ b/tools/upgrade/oceanbase_upgrade_dep.yml @@ -37,6 +37,11 @@ value: True when_come_from: [4.0.0.0, 4.1.0.0-100000192023032010] +- version: 4.2.0.0-100000152023080109 # 4.2 RC2版本 不能作为目标版本 + can_be_upgraded_to: + - 4.2.0.0 + deprecated: True + - version: 4.2.0.0 can_be_upgraded_to: - 4.3.0.0