From 2399af55575f92daa30685b41775eb781c201554 Mon Sep 17 00:00:00 2001 From: MMuzzammil1 Date: Fri, 23 Jan 2026 08:08:25 +0900 Subject: [PATCH] Bugfix: Writing to storage when write-back method is chosen (#14718) --- python/sglang/srt/mem_cache/hiradix_cache.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/mem_cache/hiradix_cache.py b/python/sglang/srt/mem_cache/hiradix_cache.py index 17a4621b2..853baef6b 100644 --- a/python/sglang/srt/mem_cache/hiradix_cache.py +++ b/python/sglang/srt/mem_cache/hiradix_cache.py @@ -308,7 +308,9 @@ class HiRadixCache(RadixCache): for _, finish_event, ack_list in self.cache_controller.ack_write_queue: finish_event.synchronize() for ack_id in ack_list: - del self.ongoing_write_through[ack_id] + backuped_node = self.ongoing_write_through.pop(ack_id) + if self.enable_storage: + self.write_backup_storage(backuped_node) self.cache_controller.ack_write_queue.clear() assert len(self.ongoing_write_through) == 0 return