[CP] Set up caching for large chunks of memory
This commit is contained in:
@ -196,9 +196,16 @@ int ObServerReloadConfig::operator()()
|
||||
|
||||
|
||||
|
||||
const int64_t cache_size = GCONF.memory_chunk_cache_size;
|
||||
const int cache_cnt = (cache_size > 0 ? cache_size : GMEMCONF.get_server_memory_limit()) / INTACT_ACHUNK_SIZE;
|
||||
lib::AChunkMgr::instance().set_max_chunk_cache_cnt(cache_cnt);
|
||||
int64_t cache_size = GCONF.memory_chunk_cache_size;
|
||||
if (0 == cache_size) {
|
||||
cache_size = GMEMCONF.get_server_memory_limit();
|
||||
}
|
||||
int64_t large_cache_size = GCONF._memory_large_chunk_cache_size;
|
||||
if (0 == large_cache_size) {
|
||||
large_cache_size = lib::AChunkMgr::DEFAULT_LARGE_CHUNK_CACHE_SIZE;
|
||||
}
|
||||
lib::AChunkMgr::instance().set_max_chunk_cache_size(cache_size);
|
||||
lib::AChunkMgr::instance().set_max_large_chunk_cache_size(large_cache_size);
|
||||
|
||||
if (!is_arbitration_mode) {
|
||||
// Refresh cluster_id, cluster_name_hash for non arbitration mode
|
||||
|
||||
Reference in New Issue
Block a user