[Bugfix] Fix eviction cached blocked logic (#21357)

Signed-off-by: simon-mo <simon.mo@hey.com>
This commit is contained in:
Simon Mo 2025-07-22 01:18:40 -07:00 committed by GitHub
parent 82b8027be6
commit 32142b3c62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -253,7 +253,7 @@ class BlockPool:
return False
block.reset_hash()
blocks_by_id.pop(block.block_id, None)
if blocks_by_id:
if len(blocks_by_id) == 0:
del self.cached_block_hash_to_block[block_hash]
if self.enable_kv_cache_events: