From 4646e5136d2e7b3294bb7cada1a8c6a385ff827f Mon Sep 17 00:00:00 2001 From: tino247 Date: Fri, 3 Nov 2023 09:13:32 +0000 Subject: [PATCH] [UPGRADE] CP `4.2.1.1` to master --- src/share/ob_cluster_version.h | 1 + src/share/ob_upgrade_utils.cpp | 3 +++ src/share/ob_upgrade_utils.h | 3 ++- tools/upgrade/oceanbase_upgrade_dep.yml | 13 ++++++++++--- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/share/ob_cluster_version.h b/src/share/ob_cluster_version.h index d8ecdfff0..4625496cf 100644 --- a/src/share/ob_cluster_version.h +++ b/src/share/ob_cluster_version.h @@ -170,6 +170,7 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat #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)) #define CLUSTER_VERSION_4_2_1_0 (oceanbase::common::cal_version(4, 2, 1, 0)) +#define CLUSTER_VERSION_4_2_1_1 (oceanbase::common::cal_version(4, 2, 1, 1)) #define CLUSTER_VERSION_4_2_2_0 (oceanbase::common::cal_version(4, 2, 2, 0)) #define CLUSTER_VERSION_4_3_0_0 (oceanbase::common::cal_version(4, 3, 0, 0)) //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src/share/ob_upgrade_utils.cpp b/src/share/ob_upgrade_utils.cpp index 8203dca44..7b2397b37 100755 --- a/src/share/ob_upgrade_utils.cpp +++ b/src/share/ob_upgrade_utils.cpp @@ -44,6 +44,7 @@ const uint64_t ObUpgradeChecker::UPGRADE_PATH[DATA_VERSION_NUM] = { CALC_VERSION(4UL, 1UL, 0UL, 2UL), // 4.1.0.2 CALC_VERSION(4UL, 2UL, 0UL, 0UL), // 4.2.0.0 CALC_VERSION(4UL, 2UL, 1UL, 0UL), // 4.2.1.0 + CALC_VERSION(4UL, 2UL, 1UL, 1UL), // 4.2.1.1 CALC_VERSION(4UL, 2UL, 2UL, 0UL), // 4.2.2.0 CALC_VERSION(4UL, 3UL, 0UL, 0UL) // 4.3.0.0 }; @@ -65,6 +66,7 @@ int ObUpgradeChecker::get_data_version_by_cluster_version( 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) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_2_1_0, DATA_VERSION_4_2_1_0) + CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_2_1_1, DATA_VERSION_4_2_1_1) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_2_2_0, DATA_VERSION_4_2_2_0) CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_3_0_0, DATA_VERSION_4_3_0_0) #undef CONVERT_CLUSTER_VERSION_TO_DATA_VERSION @@ -625,6 +627,7 @@ int ObUpgradeProcesserSet::init( INIT_PROCESSOR_BY_VERSION(4, 1, 0, 2); INIT_PROCESSOR_BY_VERSION(4, 2, 0, 0); INIT_PROCESSOR_BY_VERSION(4, 2, 1, 0); + INIT_PROCESSOR_BY_VERSION(4, 2, 1, 1); INIT_PROCESSOR_BY_VERSION(4, 2, 2, 0); INIT_PROCESSOR_BY_VERSION(4, 3, 0, 0); #undef INIT_PROCESSOR_BY_VERSION diff --git a/src/share/ob_upgrade_utils.h b/src/share/ob_upgrade_utils.h index 01e42b4e0..a93882e37 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 = 8; + static const int64_t DATA_VERSION_NUM = 9; static const uint64_t UPGRADE_PATH[DATA_VERSION_NUM]; }; @@ -210,6 +210,7 @@ private: }; DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 1, 0) +DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 1, 1) DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 2, 0) DEF_SIMPLE_UPGRARD_PROCESSER(4, 3, 0, 0) /* =========== special upgrade processor end ============= */ diff --git a/tools/upgrade/oceanbase_upgrade_dep.yml b/tools/upgrade/oceanbase_upgrade_dep.yml index 66859b28d..cc1007f7a 100644 --- a/tools/upgrade/oceanbase_upgrade_dep.yml +++ b/tools/upgrade/oceanbase_upgrade_dep.yml @@ -55,10 +55,17 @@ can_be_upgraded_to: - 4.2.1.0 +# 4.2.1.x is barrier - version: 4.2.1.0 can_be_upgraded_to: - - 4.3.0.0 + - 4.2.1.1 -- version: 4.3.0.0 +- version: 4.2.1.1 can_be_upgraded_to: - - 4.3.1.0 + - 4.3.0.0 + require_from_binary: + value: True + when_come_from: [4.1.0.0, 4.1.0.1, 4.1.0.2, 4.2.0.0] + +# 4.3.0.x +- version: 4.3.0.0