[FEAT MERGE] log4200
Co-authored-by: zhjc1124 <zhjc1124@gmail.com> Co-authored-by: BinChenn <binchenn.bc@gmail.com> Co-authored-by: oceanoverflow <oceanoverflow@gmail.com>
This commit is contained in:
@ -24,7 +24,8 @@ using namespace share;
|
||||
namespace storage
|
||||
{
|
||||
ObLocalityManager::ObLocalityManager()
|
||||
: rwlock_(ObLatchIds::SERVER_LOCALITY_MGR_LOCK), ssl_invited_nodes_buf_(NULL)
|
||||
: rwlock_(ObLatchIds::SERVER_LOCALITY_MGR_LOCK),
|
||||
ssl_invited_nodes_buf_(NULL)
|
||||
{
|
||||
reset();
|
||||
ssl_invited_nodes_buf_ = new (std::nothrow) char[common::OB_MAX_CONFIG_VALUE_LEN];
|
||||
@ -236,6 +237,7 @@ int ObLocalityManager::load_region()
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int ObLocalityManager::get_local_region(ObRegion ®ion) const
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -311,6 +313,22 @@ int ObLocalityManager::get_server_locality_array(
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObLocalityManager::get_server_zone_type(const common::ObAddr &server,
|
||||
common::ObZoneType &zone_type) const
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_UNLIKELY(!is_inited_)) {
|
||||
ret = OB_NOT_INIT;
|
||||
STORAGE_LOG(WARN, "ObLocalityManager not init", KR(ret));
|
||||
} else if (!server.is_valid()) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
STORAGE_LOG(WARN, "invalid argument", KR(ret), K(server));
|
||||
} else if (OB_FAIL(server_locality_cache_.get_server_zone_type(server, zone_type))) {
|
||||
STORAGE_LOG(WARN, "fail to get server zone type", KR(ret), K(server));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObLocalityManager::get_server_region(const common::ObAddr &server,
|
||||
common::ObRegion ®ion) const
|
||||
{
|
||||
@ -690,6 +708,5 @@ int ObLocalityManager::ObRefreshLocalityTask::process()
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
}// storage
|
||||
}// oceanbase
|
||||
|
||||
Reference in New Issue
Block a user