[FEAT MERGE] server manager 微服务化改造

Co-authored-by: maosy <630014370@qq.com>
This commit is contained in:
obdev
2023-04-27 16:13:23 +08:00
committed by ob-robot
parent 57f1c6e7ee
commit 6b8425d8b0
138 changed files with 7492 additions and 3310 deletions

View File

@ -37,9 +37,22 @@ public:
common::ObISQLClient &sql_client, common::ObIArray<common::ObZone> &zone_list);
static int get_zone_lease_info(common::ObISQLClient &sql_client, ObZoneLeaseInfo &info);
static int load_global_info(common::ObISQLClient &sql_client, ObGlobalInfo &info);
static int load_zone_info(common::ObISQLClient &sql_client, ObZoneInfo &info);
// check_zone_exists is a newly added arg.
// If the zone not exists,
// in the previous implementation, OB_SUCCESS will be returned.
// However, if check_zone_exists is set, OB_ZONE_INFO_NOT_EXIST will be returned.
static int load_global_info(
common::ObISQLClient &sql_client,
ObGlobalInfo &info,
const bool check_zone_exists = false);
// check_zone_exists is a newly added arg.
// If the zone not exists,
// in the previous implementation, OB_SUCCESS will be returned.
// However, if check_zone_exists is set, OB_ZONE_INFO_NOT_EXIST will be returned.
static int load_zone_info(
common::ObISQLClient &sql_client,
ObZoneInfo &info,
const bool check_zone_exists = false);
static int insert_global_info(common::ObISQLClient &sql_client, ObGlobalInfo &info);
static int insert_zone_info(common::ObISQLClient &sql_client, ObZoneInfo &info);
@ -47,15 +60,42 @@ public:
static int remove_zone_info(common::ObISQLClient &sql_client, const common::ObZone &zone);
static int get_region_list(
common::ObISQLClient &sql_client, common::ObIArray<common::ObRegion> &region_list);
static int check_encryption_zone(
common::ObISQLClient &sql_client,
const common::ObZone &zone,
bool &encryption);
static int check_zone_active(
common::ObISQLClient &sql_client,
const common::ObZone &zone,
bool &is_active);
static int get_inactive_zone_list(
common::ObISQLClient &sql_client,
common::ObIArray<common::ObZone> &zone_list);
static int get_active_zone_list(
common::ObISQLClient &sql_client,
common::ObIArray<common::ObZone> &zone_list);
private:
template <typename T>
static int set_info_item(const char *name, const int64_t value, const char *info_str,
T &info);
template <typename T>
static int load_info(common::ObISQLClient &sql_client, T &info);
static int load_info(
common::ObISQLClient &sql_client,
T &info,
const bool check_zone_exists);
template <typename T>
static int insert_info(common::ObISQLClient &sql_client, T &info);
static int get_zone_item_count(int64_t &cnt);
static int get_zone_info(
const ObZone &zone,
common::ObISQLClient &sql_client,
ObZoneInfo &zone_info);
// if is_active, then get active zone_list
// if !is_active, then get inactive zone_list
static int get_zone_list_(
common::ObISQLClient &sql_client,
common::ObIArray<common::ObZone> &zone_list,
const bool is_active);
};
}//end namespace share