Fix crash after flush cache (#12107)

Co-authored-by: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com>
This commit is contained in:
cctry
2025-10-27 23:52:27 +08:00
committed by GitHub
co-authored by fzyzcjy
parent f389f01714
commit 3029d30189
2 changed files with 25 additions and 4 deletions
@@ -533,6 +533,10 @@ class RadixCache(BasePrefixCache):
self.protected_size_ -= len(node.key)
delta += len(node.key)
node.lock_ref -= 1
if node.parent is None:
assert (
node is self.root_node
), f"This request holds the node from another tree"
node = node.parent
return delta