This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 0122b8a6b44709a4f21c96dd141c675305491160 Author: airborne12 <[email protected]> AuthorDate: Tue Mar 26 10:54:57 2024 +0800 [Update](inverted index) add config for inverted index query cache shards (#32666) --- be/src/common/config.cpp | 1 + be/src/common/config.h | 1 + be/src/runtime/exec_env_init.cpp | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp index c73e3670b3f..d577f5994d4 100644 --- a/be/src/common/config.cpp +++ b/be/src/common/config.cpp @@ -982,6 +982,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 ae4ff9c410e..951fd62f87f 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -1023,6 +1023,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 d0dcf7ea815..9f7cd1ff033 100644 --- a/be/src/runtime/exec_env_init.cpp +++ b/be/src/runtime/exec_env_init.cpp @@ -478,8 +478,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, 256); + _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; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
