[FEAT MERGE] merge transfer

Co-authored-by: wxhwang <wxhwang@126.com>
Co-authored-by: godyangfight <godyangfight@gmail.com>
Co-authored-by: Tyshawn <tuyunshan@gmail.com>
This commit is contained in:
xuhuleon
2023-06-21 11:42:26 +00:00
committed by ob-robot
parent d06678002e
commit 9dae112952
1280 changed files with 149724 additions and 48813 deletions

View File

@ -18,6 +18,7 @@
#include "lib/oblog/ob_log_module.h"
#include "share/ob_cluster_version.h" // for GET_MIN_DATA_VERSION
#include "lib/mysqlclient/ob_isql_client.h"
#include "observer/omt/ob_tenant_config_mgr.h" // ObTenantConfigGuard
namespace oceanbase
{
@ -270,5 +271,20 @@ int ObShareUtil::parse_all_server_list(
}
return ret;
}
bool ObShareUtil::is_tenant_enable_rebalance(const uint64_t tenant_id)
{
bool bret = false;
if (is_valid_tenant_id(tenant_id)) {
omt::ObTenantConfigGuard tenant_config(TENANT_CONF(tenant_id));
if (OB_UNLIKELY(!tenant_config.is_valid())) {
LOG_WARN_RET(OB_ERR_UNEXPECTED, "tenant config is invalid", K(tenant_id));
} else {
bret = tenant_config->enable_rebalance;
}
}
return bret;
}
} //end namespace share
} //end namespace oceanbase