From 14e122cdee7142ecd52e455d21be08403ed32c2a Mon Sep 17 00:00:00 2001 From: JINZ <1023553676@qq.com> Date: Thu, 16 Apr 2026 10:49:30 +0800 Subject: [PATCH] [BugFix][RadixTree]:Fix stale eviction assertion in HiMambaRadixCache host eviction path (#22592) Co-authored-by: Zhangheng --- python/sglang/srt/mem_cache/hi_mamba_radix_cache.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/sglang/srt/mem_cache/hi_mamba_radix_cache.py b/python/sglang/srt/mem_cache/hi_mamba_radix_cache.py index 0b9c8f680..42c7ea43e 100644 --- a/python/sglang/srt/mem_cache/hi_mamba_radix_cache.py +++ b/python/sglang/srt/mem_cache/hi_mamba_radix_cache.py @@ -483,13 +483,10 @@ class HiMambaRadixCache(MambaRadixCache): or node == self.root_node or node.host_ref_counter > 0 or node.host_mamba_ref_counter > 0 + or len(node.children) > 0 ): self.evictable_full_host_leaves.discard(node) return - for child in node.children.values(): - if child.evicted and child.backuped: - self.evictable_full_host_leaves.discard(node) - return self.evictable_full_host_leaves.add(node) def _free_device_mamba(self, node: TreeNode) -> int: