[Bugfix] Fall back to T1 when ARC cannot reclaim enough entries from T2 (#55461)
Signed-off-by: Wang Zupeng <zupenwang@gmail.com> Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -145,9 +145,15 @@ class ARCCachePolicy(CachePolicy):
|
||||
|
||||
if candidate is None:
|
||||
entry = next_candidate(t2_iter)
|
||||
if entry is not None:
|
||||
candidate = (*entry, False)
|
||||
|
||||
if candidate is None:
|
||||
entry = next_candidate(t1_iter)
|
||||
if entry is None:
|
||||
return None
|
||||
candidate = (*entry, False)
|
||||
candidate = (*entry, True)
|
||||
virtual_t1_size -= 1
|
||||
|
||||
candidates.append(candidate)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user