[UPGRADE] Raise cluster_version/data_version to 4.2.1.0

This commit is contained in:
tino247 2023-08-15 08:11:00 +00:00 committed by ob-robot
parent 2bb6877cdd
commit 7dc7844cef
10 changed files with 26 additions and 15 deletions

View File

@ -5,14 +5,14 @@ include(cmake/Env.cmake)
if(OB_BUILD_OPENSOURCE)
project("OceanBase_CE"
VERSION 4.2.0.0
VERSION 4.2.1.0
DESCRIPTION "OceanBase distributed database system"
HOMEPAGE_URL "https://open.oceanbase.com/"
LANGUAGES CXX C ASM)
message(STATUS "open source build enabled")
else()
project(OceanBase
VERSION 4.2.0.0
VERSION 4.2.1.0
DESCRIPTION "OceanBase distributed database system"
HOMEPAGE_URL "https://www.oceanbase.com/"
LANGUAGES CXX C ASM)

View File

@ -1,4 +1,4 @@
Name: %NAME
Version:4.2.0.0
Version:4.2.1.0
Release: %RELEASE
BuildRequires: binutils = 2.30

View File

@ -169,9 +169,10 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat
#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))
#define CLUSTER_VERSION_4_2_1_0 (oceanbase::common::cal_version(4, 2, 1, 0))
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//TODO: If you update the above version, please update CLUSTER_CURRENT_VERSION.
#define CLUSTER_CURRENT_VERSION CLUSTER_VERSION_4_2_0_0
#define CLUSTER_CURRENT_VERSION CLUSTER_VERSION_4_2_1_0
#define GET_MIN_CLUSTER_VERSION() (oceanbase::common::ObClusterVersion::get_instance().get_cluster_version())
#define IS_CLUSTER_VERSION_BEFORE_4_1_0_0 (oceanbase::common::ObClusterVersion::get_instance().get_cluster_version() < CLUSTER_VERSION_4_1_0_0)
@ -185,8 +186,9 @@ cal_version(const uint64_t major, const uint64_t minor, const uint64_t major_pat
#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_VERSION_4_2_1_0 (oceanbase::common::cal_version(4, 2, 1, 0))
#define DATA_CURRENT_VERSION DATA_VERSION_4_2_0_0
#define DATA_CURRENT_VERSION DATA_VERSION_4_2_1_0
// ATTENSION !!!!!!!!!!!!!!!!!!!!!!!!!!!
// LAST_BARRIER_DATA_VERSION should be the latest barrier data version before DATA_CURRENT_VERSION
#define LAST_BARRIER_DATA_VERSION DATA_VERSION_4_1_0_0

View File

@ -42,7 +42,8 @@ const uint64_t ObUpgradeChecker::UPGRADE_PATH[DATA_VERSION_NUM] = {
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
CALC_VERSION(4UL, 2UL, 0UL, 0UL), // 4.2.0.0
CALC_VERSION(4UL, 2UL, 1UL, 0UL) // 4.2.1.0
};
int ObUpgradeChecker::get_data_version_by_cluster_version(
@ -61,6 +62,7 @@ int ObUpgradeChecker::get_data_version_by_cluster_version(
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)
CONVERT_CLUSTER_VERSION_TO_DATA_VERSION(CLUSTER_VERSION_4_2_1_0, DATA_VERSION_4_2_1_0)
#undef CONVERT_CLUSTER_VERSION_TO_DATA_VERSION
default: {
ret = OB_INVALID_ARGUMENT;
@ -618,6 +620,7 @@ int ObUpgradeProcesserSet::init(
INIT_PROCESSOR_BY_VERSION(4, 1, 0, 1);
INIT_PROCESSOR_BY_VERSION(4, 1, 0, 2);
INIT_PROCESSOR_BY_VERSION(4, 2, 0, 0);
INIT_PROCESSOR_BY_VERSION(4, 2, 1, 0);
#undef INIT_PROCESSOR_BY_VERSION
inited_ = true;
}

View File

@ -170,7 +170,7 @@ public:
const uint64_t cluster_version,
uint64_t &data_version);
public:
static const int64_t DATA_VERSION_NUM = 5;
static const int64_t DATA_VERSION_NUM = 6;
static const uint64_t UPGRADE_PATH[DATA_VERSION_NUM];
};
@ -208,6 +208,8 @@ private:
int post_upgrade_for_grant_drop_database_link_priv();
int post_upgrade_for_heartbeat_and_server_zone_op_service();
};
DEF_SIMPLE_UPGRARD_PROCESSER(4, 2, 1, 0)
/* =========== special upgrade processor end ============= */
/* =========== upgrade processor end ============= */

View File

@ -463,9 +463,9 @@ DEF_TIME(tablet_meta_table_check_interval, OB_CLUSTER_PARAMETER, "30m", "[1m,)",
"the time interval that observer compares tablet meta table with local ls replica info "
"and make adjustments to ensure the correctness of tablet meta table. Range: [1m,+∞)",
ObParameterAttr(Section::ROOT_SERVICE, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_STR(min_observer_version, OB_CLUSTER_PARAMETER, "4.2.0.0", "the min observer version",
DEF_STR(min_observer_version, OB_CLUSTER_PARAMETER, "4.2.1.0", "the min observer version",
ObParameterAttr(Section::ROOT_SERVICE, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_VERSION(compatible, OB_TENANT_PARAMETER, "4.2.0.0", "compatible version for persisted data",
DEF_VERSION(compatible, OB_TENANT_PARAMETER, "4.2.1.0", "compatible version for persisted data",
ObParameterAttr(Section::ROOT_SERVICE, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_BOOL(enable_ddl, OB_CLUSTER_PARAMETER, "True", "specifies whether DDL operation is turned on. "
"Value: True:turned on; False: turned off",

View File

@ -18,8 +18,8 @@ class SqlItem:
self.action_sql = action_sql
self.rollback_sql = rollback_sql
current_cluster_version = "4.2.0.0"
current_data_version = "4.2.0.0"
current_cluster_version = "4.2.1.0"
current_data_version = "4.2.1.0"
g_succ_sql_list = []
g_commit_sql_list = []

View File

@ -47,5 +47,9 @@
deprecated: True
- version: 4.2.0.0
can_be_upgraded_to:
- 4.2.1.0
- version: 4.2.1.0
can_be_upgraded_to:
- 4.3.0.0

View File

@ -26,8 +26,8 @@
# self.action_sql = action_sql
# self.rollback_sql = rollback_sql
#
#current_cluster_version = "4.2.0.0"
#current_data_version = "4.2.0.0"
#current_cluster_version = "4.2.1.0"
#current_data_version = "4.2.1.0"
#g_succ_sql_list = []
#g_commit_sql_list = []
#

View File

@ -26,8 +26,8 @@
# self.action_sql = action_sql
# self.rollback_sql = rollback_sql
#
#current_cluster_version = "4.2.0.0"
#current_data_version = "4.2.0.0"
#current_cluster_version = "4.2.1.0"
#current_data_version = "4.2.1.0"
#g_succ_sql_list = []
#g_commit_sql_list = []
#