[opt](meta-cache) refine the meta cache (#33449)#33754
Merged
morningman merged 1 commit intoapache:branch-2.1from Apr 17, 2024
Merged
[opt](meta-cache) refine the meta cache (#33449)#33754morningman merged 1 commit intoapache:branch-2.1from
morningman merged 1 commit intoapache:branch-2.1from
Conversation
1. Use `caffeine` instead of `guava cache` to get better performace
2. Add a new class `CacheFactory`
All (Async)LoadingCache should be built from `CacheFactory`
3. Use separator executor for different caches
1. rowCountRefreshExecutor
For row count cache.
Row count cache is an async loading cache, and we can ignore the result
if cache missing or thread pool is full.
So use a separate executor for this cache.
2. commonRefreshExecutor
For other caches. Other caches are sync loading cache.
But commonRefreshExecutor will be used for async refresh.
That is, if cache entry is missing, the cache value will be loaded in caller thread, sychronously.
if cache entry need refresh, it will be reloaded in commonRefreshExecutor.
3. fileListingExecutor
File listing is a heavy operation, so use a separate executor for it.
For fileCache, the refresh operation will still use commonRefreshExecutor to trigger refresh.
And fileListingExecutor will be used to list file.
4. Change the refresh and expire logic of caches
For most of caches, set `refreshAfterWrite` strategy, so that
even if the cache entry is expired, the old entry can still be
used while new entry is being loaded.
5. Add new global variable `enable_get_row_count_from_file_list`
Default is true, if false, will disable getting row count from file list
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
yiguolei
pushed a commit
that referenced
this pull request
Apr 17, 2024
morningman
added a commit
to morningman/doris
that referenced
this pull request
Apr 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bp #33449