add checker for system_memory and memory_limit

This commit is contained in:
obdev
2022-11-10 08:37:49 +00:00
committed by wangzelin.wzl
parent d73a417102
commit 0621c4812e
13 changed files with 159 additions and 115 deletions

View File

@ -177,7 +177,7 @@ int ObTenantSSTableMergeInfoMgr::init(const int64_t memory_limit)
STORAGE_LOG(WARN, "Invalid argument", K(ret), K(memory_limit));
} else {
void *buf = NULL;
int64_t max_info_cnt = min(GCONF.get_server_memory_limit(), memory_limit) / (sizeof(ObSSTableMergeInfo));
int64_t max_info_cnt = min(GMEMCONF.get_server_memory_limit(), memory_limit) / (sizeof(ObSSTableMergeInfo));
if (max_info_cnt < 2) {
max_info_cnt = 2;
}