-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](filecache) ttl cache runs wild after enable LRU eviction #39814
Conversation
Scenarios where issues occur: - TTL with LRU eviction enabled (config::enable_ttl_cache_evict_using_lru = true) - TTL's try_reserve_for_ttl_without_lru encounters a limitation set by config::max_ttl_cache_ratio = 90% - LRU begins the eviction process. However, the amount of eviction is determined solely by the condition !is_overflow(), which does not consider the 90% limitation. This leads to a premature return of a successful reserve, resulting in the overall TTL exceeding the 90% limit. Modification method: For the TTL and LRU eviction quantities, in addition to checking for !is_overflow, the condition must also satisfy the restriction set by config::max_ttl_cache_ratio. Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
TPC-H: Total hot run time: 37966 ms
|
TPC-DS: Total hot run time: 191158 ms
|
ClickBench: Total hot run time: 30.67 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Scenarios where issues occur: - TTL with LRU eviction enabled (config::enable_ttl_cache_evict_using_lru = true) - TTL's try_reserve_for_ttl_without_lru encounters a limitation set by config::max_ttl_cache_ratio = 90% - LRU begins the eviction process. However, the amount of eviction is determined solely by the condition !is_overflow(), which does not consider the 90% limitation. This leads to a premature return of a successful reserve, resulting in the overall TTL exceeding the 90% limit. Modification: For the TTL and LRU eviction quantities, in addition to checking for !is_overflow, the condition must also satisfy the restriction set by config::max_ttl_cache_ratio. Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
Scenarios where issues occur:
Modification:
For the TTL and LRU eviction quantities, in addition to checking for !is_overflow, the condition must also satisfy the restriction set by config::max_ttl_cache_ratio.
Proposed changes
Issue Number: close #xxx