-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](filecache) ttl cache runs wild after enable LRU eviction (#39814)
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>
- Loading branch information
1 parent
a5a5b32
commit 4eb090c
Showing
4 changed files
with
101 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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