[FEAT MERGE] Add anti-fallback checks for the memory of 500 tenant
This commit is contained in:
@ -79,6 +79,7 @@ const char *ObMultiVersionSchemaService::print_refresh_schema_mode(const Refresh
|
||||
|
||||
ObSchemaConstructTask::ObSchemaConstructTask()
|
||||
{
|
||||
schema_tasks_.set_attr(SET_USE_500(ObMemAttr(OB_SERVER_TENANT_ID, "SchemaTasks")));
|
||||
(void)pthread_mutex_init(&schema_mutex_, NULL);
|
||||
(void)pthread_cond_init(&schema_cond_, NULL);
|
||||
}
|
||||
@ -3679,8 +3680,8 @@ int ObMultiVersionSchemaService::get_new_schema_version(uint64_t tenant_id, int6
|
||||
}
|
||||
|
||||
int ObMultiVersionSchemaService::get_tenant_mem_info(
|
||||
const uint64_t &tenant_id,
|
||||
common::ObIArray<ObSchemaMemory> &tenant_mem_infos)
|
||||
const uint64_t &tenant_id,
|
||||
common::ObIArray<ObSchemaMemory> &tenant_mem_infos)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObSchemaMemMgr *mem_mgr = NULL;
|
||||
@ -3697,19 +3698,19 @@ int ObMultiVersionSchemaService::get_tenant_mem_info(
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("mem_mgr is NULL", KR(ret), K(tenant_id));
|
||||
} else if (OB_FAIL(mem_mgr->get_all_alloc_info(tenant_mem_infos))) {
|
||||
LOG_WARN("fail to get mem_mgr alloc info", KR(ret), K(tenant_id));
|
||||
LOG_WARN("fail to get mem_mgr alloc info", KR(ret), K(tenant_id));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObMultiVersionSchemaService::get_tenant_slot_info(
|
||||
common::ObIAllocator &allocator,
|
||||
const uint64_t &tenant_id,
|
||||
common::ObIAllocator &allocator,
|
||||
const uint64_t &tenant_id,
|
||||
common::ObIArray<ObSchemaSlot> &tenant_slot_infos)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObSchemaStore * schema_store = NULL;
|
||||
|
||||
|
||||
if (OB_INVALID_TENANT_ID == tenant_id) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_WARN("invalid tenant_id", KR(ret), K(tenant_id));
|
||||
@ -3735,7 +3736,7 @@ int ObMultiVersionSchemaService::get_schema_store_tenants(common::ObIArray<uint6
|
||||
|
||||
bool ObMultiVersionSchemaService::check_schema_store_tenant_exist(const uint64_t &tenant_id) {
|
||||
bool exist = true;
|
||||
ObSchemaStore* schema_store = NULL;
|
||||
ObSchemaStore* schema_store = NULL;
|
||||
if (OB_ISNULL(schema_store = schema_store_map_.get(tenant_id))) {
|
||||
exist = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user