Skip to content

Commit 0ef2153

Browse files
committed
Fix
1 parent fb290ea commit 0ef2153

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Interpreters/Cache/SLRUFileCachePriority.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,13 @@ bool SLRUFileCachePriority::collectCandidatesForEvictionInProtected(
209209
{
210210
return false;
211211
}
212-
else
213-
chassert(downgrade_candidates->size() > 0);
212+
213+
/// We can have no downgrade candidates because cache size could
214+
/// reduce concurrently because of lock-free cache entries invalidation.
215+
if (downgrade_candidates->size() == 0)
216+
{
217+
return true;
218+
}
214219

215220
if (!probationary_queue.collectCandidatesForEviction(
216221
downgrade_stat.total_stat.releasable_size, downgrade_stat.total_stat.releasable_count,

0 commit comments

Comments
 (0)