Skip to content

Commit c8daf2e

Browse files
branch-2.1: [fix](cache prune) Fix _stale_sweep_time_s not working when its value less than 0 #42281 (#51189)
Cherry-picked from #42281 Co-authored-by: zhiqiang <seuhezhiqiang@163.com>
1 parent 831d2c1 commit c8daf2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

be/src/runtime/memory/lru_cache_policy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class LRUCachePolicy : public CachePolicy {
120120
void prune_stale() override {
121121
COUNTER_SET(_freed_entrys_counter, (int64_t)0);
122122
COUNTER_SET(_freed_memory_counter, (int64_t)0);
123-
if (_stale_sweep_time_s <= 0 && _cache == ExecEnv::GetInstance()->get_dummy_lru_cache()) {
123+
if (_stale_sweep_time_s <= 0 || _cache == ExecEnv::GetInstance()->get_dummy_lru_cache()) {
124124
return;
125125
}
126126
if (exceed_prune_limit()) {

0 commit comments

Comments
 (0)