Skip to content

Commit

Permalink
[Update](inverted index) add config for inverted index query cache sh…
Browse files Browse the repository at this point in the history
…ards (apache#32666)
  • Loading branch information
airborne12 committed Apr 22, 2024
1 parent 792907f commit 4e2a441
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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%");
Expand Down
1 change: 1 addition & 0 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions be/src/runtime/exec_env_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4e2a441

Please sign in to comment.