diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp index f534e70126dd02..13af903a5a9f81 100644 --- a/be/src/common/config.cpp +++ b/be/src/common/config.cpp @@ -1009,6 +1009,7 @@ DEFINE_String(inverted_index_searcher_cache_limit, "10%"); DEFINE_Bool(enable_write_index_searcher_cache, "true"); DEFINE_Bool(enable_inverted_index_cache_check_timestamp, "true"); DEFINE_Int32(inverted_index_fd_number_limit_percent, "40"); // 40% +DEFINE_Int32(inverted_index_query_cache_shards, "256"); // inverted index match bitmap cache size DEFINE_String(inverted_index_query_cache_limit, "10%"); diff --git a/be/src/common/config.h b/be/src/common/config.h index 70713447ca1495..45d779bd341326 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -1046,6 +1046,7 @@ DECLARE_String(inverted_index_searcher_cache_limit); DECLARE_Bool(enable_write_index_searcher_cache); DECLARE_Bool(enable_inverted_index_cache_check_timestamp); DECLARE_Int32(inverted_index_fd_number_limit_percent); // 50% +DECLARE_Int32(inverted_index_query_cache_shards); // inverted index match bitmap cache size DECLARE_String(inverted_index_query_cache_limit); diff --git a/be/src/runtime/exec_env_init.cpp b/be/src/runtime/exec_env_init.cpp index de3b9a2f32fbdf..307bf6b976502a 100644 --- a/be/src/runtime/exec_env_init.cpp +++ b/be/src/runtime/exec_env_init.cpp @@ -470,8 +470,8 @@ Status ExecEnv::_init_mem_env() { // Reason same as buffer_pool_limit inverted_index_query_cache_limit = inverted_index_query_cache_limit / 2; } - _inverted_index_query_cache = - InvertedIndexQueryCache::create_global_cache(inverted_index_query_cache_limit); + _inverted_index_query_cache = InvertedIndexQueryCache::create_global_cache( + inverted_index_query_cache_limit, config::inverted_index_query_cache_shards); LOG(INFO) << "Inverted index query match cache memory limit: " << PrettyPrinter::print(inverted_index_cache_limit, TUnit::BYTES) << ", origin config value: " << config::inverted_index_query_cache_limit;