[UPGRADE] Add version 4.2.2.1

This commit is contained in:
tino247
2024-02-28 09:14:39 +00:00
committed by ob-robot
parent fc23aae5aa
commit b7780a5694
6 changed files with 17 additions and 8 deletions

View File

@ -172,8 +172,10 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat
#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_1_2 (oceanbase::common::cal_version(4, 2, 1, 2))
#define CLUSTER_VERSION_4_2_1_3 (oceanbase::common::cal_version(4, 2, 1, 3))
#define MOCK_CLUSTER_VERSION_4_2_1_3 (oceanbase::common::cal_version(4, 2, 1, 3))
#define MOCK_CLUSTER_VERSION_4_2_1_4 (oceanbase::common::cal_version(4, 2, 1, 4))
#define CLUSTER_VERSION_4_2_2_0 (oceanbase::common::cal_version(4, 2, 2, 0))
#define MOCK_CLUSTER_VERSION_4_2_2_1 (oceanbase::common::cal_version(4, 2, 2, 1))
#define MOCK_CLUSTER_VERSION_4_2_3_0 (oceanbase::common::cal_version(4, 2, 3, 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))
@ -197,7 +199,10 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat
#define DATA_VERSION_4_2_1_0 (oceanbase::common::cal_version(4, 2, 1, 0))
#define DATA_VERSION_4_2_1_1 (oceanbase::common::cal_version(4, 2, 1, 1))
#define DATA_VERSION_4_2_1_2 (oceanbase::common::cal_version(4, 2, 1, 2))
#define MOCK_DATA_VERSION_4_2_1_3 (oceanbase::common::cal_version(4, 2, 1, 3))
#define MOCK_DATA_VERSION_4_2_1_4 (oceanbase::common::cal_version(4, 2, 1, 4))
#define DATA_VERSION_4_2_2_0 (oceanbase::common::cal_version(4, 2, 2, 0))
#define MOCK_DATA_VERSION_4_2_2_1 (oceanbase::common::cal_version(4, 2, 2, 1))
#define MOCK_DATA_VERSION_4_2_3_0 (oceanbase::common::cal_version(4, 2, 3, 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))

View File

@ -47,6 +47,7 @@ const uint64_t ObUpgradeChecker::UPGRADE_PATH[] = {
CALC_VERSION(4UL, 2UL, 1UL, 1UL), // 4.2.1.1
CALC_VERSION(4UL, 2UL, 1UL, 2UL), // 4.2.1.2
CALC_VERSION(4UL, 2UL, 2UL, 0UL), // 4.2.2.0
CALC_VERSION(4UL, 2UL, 2UL, 1UL), // 4.2.2.1
CALC_VERSION(4UL, 2UL, 3UL, 0UL), // 4.2.3.0
CALC_VERSION(4UL, 3UL, 0UL, 0UL), // 4.3.0.0
CALC_VERSION(4UL, 3UL, 0UL, 1UL), // 4.3.0.1
@ -72,6 +73,7 @@ int ObUpgradeChecker::get_data_version_by_cluster_version(
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_1_2, DATA_VERSION_4_2_1_2)
CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_2_2_0, DATA_VERSION_4_2_2_0)
CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(MOCK_CLUSTER_VERSION_4_2_2_1, MOCK_DATA_VERSION_4_2_2_1)
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(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)
@ -636,6 +638,7 @@ int ObUpgradeProcesserSet::init(
INIT_PROCESSOR_BY_VERSION(4, 2, 1, 1);
INIT_PROCESSOR_BY_VERSION(4, 2, 1, 2);
INIT_PROCESSOR_BY_VERSION(4, 2, 2, 0);
INIT_PROCESSOR_BY_VERSION(4, 2, 2, 1);
INIT_PROCESSOR_BY_VERSION(4, 2, 3, 0);
INIT_PROCESSOR_BY_VERSION(4, 3, 0, 0);
INIT_PROCESSOR_BY_VERSION(4, 3, 0, 1);

View File

@ -170,7 +170,7 @@ public:
const uint64_t cluster_version,
uint64_t &data_version);
public:
static const int64_t DATA_VERSION_NUM = 12;
static const int64_t DATA_VERSION_NUM = 13;
static const uint64_t UPGRADE_PATH[];
};
@ -223,6 +223,7 @@ private:
};
DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 1, 2)
DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 2, 0)
DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 2, 1)
DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 3, 0)
DEF_SIMPLE_UPGRARD_PROCESSER(4, 3, 0, 0)
DEF_SIMPLE_UPGRARD_PROCESSER(4, 3, 0, 1)

View File

@ -668,8 +668,8 @@ int ObInnerConnectionLockUtil::request_lock_(
} else {
int32_t group_id = 0;
const int64_t min_cluster_version = GET_MIN_CLUSTER_VERSION();
if ((min_cluster_version > CLUSTER_VERSION_4_2_1_3 && min_cluster_version < CLUSTER_VERSION_4_2_2_0)
|| (min_cluster_version > CLUSTER_VERSION_4_2_2_0 && min_cluster_version < CLUSTER_VERSION_4_3_0_0)
if ((min_cluster_version >= MOCK_CLUSTER_VERSION_4_2_1_4 && min_cluster_version < CLUSTER_VERSION_4_2_2_0)
|| (min_cluster_version >= MOCK_CLUSTER_VERSION_4_2_3_0 && min_cluster_version < CLUSTER_VERSION_4_3_0_0)
|| (min_cluster_version >= CLUSTER_VERSION_4_3_0_0)) {
if (arg.is_unlock_request()) {
group_id = share::OBCG_UNLOCK;

View File

@ -264,8 +264,8 @@ bool ObLockRequest::is_valid() const
bool ObLockRequest::is_lock_thread_enabled() const
{
const int64_t min_cluster_version = GET_MIN_CLUSTER_VERSION();
return ((min_cluster_version > CLUSTER_VERSION_4_2_1_3 && min_cluster_version < CLUSTER_VERSION_4_2_2_0)
|| (min_cluster_version > CLUSTER_VERSION_4_2_2_0 && min_cluster_version < CLUSTER_VERSION_4_3_0_0)
return ((min_cluster_version >= MOCK_CLUSTER_VERSION_4_2_1_4 && min_cluster_version < CLUSTER_VERSION_4_2_2_0)
|| (min_cluster_version >= MOCK_CLUSTER_VERSION_4_2_3_0 && min_cluster_version < CLUSTER_VERSION_4_3_0_0)
|| (min_cluster_version >= CLUSTER_VERSION_4_3_0_0));
}

View File

@ -1794,8 +1794,8 @@ int ObTableLockService::rpc_call_(RpcProxy &proxy_batch,
int ret = OB_SUCCESS;
int32_t group_id = 0;
const int64_t min_cluster_version = GET_MIN_CLUSTER_VERSION();
if ((min_cluster_version > CLUSTER_VERSION_4_2_1_3 && min_cluster_version < CLUSTER_VERSION_4_2_2_0)
|| (min_cluster_version > CLUSTER_VERSION_4_2_2_0 && min_cluster_version < CLUSTER_VERSION_4_3_0_0)
if ((min_cluster_version >= MOCK_CLUSTER_VERSION_4_2_1_4 && min_cluster_version < CLUSTER_VERSION_4_2_2_0)
|| (min_cluster_version >= MOCK_CLUSTER_VERSION_4_2_3_0 && min_cluster_version < CLUSTER_VERSION_4_3_0_0)
|| (min_cluster_version >= CLUSTER_VERSION_4_3_0_0)) {
group_id = share::OBCG_LOCK;
if (request.is_unlock_request()) {