From 0a5c9728a16fc12be379faa58d43968f39a4fa38 Mon Sep 17 00:00:00 2001 From: Zhangheng Date: Wed, 15 Apr 2026 19:49:54 +0800 Subject: [PATCH] [HiSparse][BugFix]: Fix the memory leak issue during health checks. (#22882) --- python/sglang/srt/managers/scheduler_output_processor_mixin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/sglang/srt/managers/scheduler_output_processor_mixin.py b/python/sglang/srt/managers/scheduler_output_processor_mixin.py index 3bbd3e5f8..c8172f603 100644 --- a/python/sglang/srt/managers/scheduler_output_processor_mixin.py +++ b/python/sglang/srt/managers/scheduler_output_processor_mixin.py @@ -89,6 +89,8 @@ class SchedulerOutputProcessorMixin: req.check_finished() if req.finished(): req.time_stats.set_quick_finish_time() + if self.enable_hisparse: + self.hisparse_coordinator.request_finished(req) release_kv_cache(req, self.tree_cache) # Note: Logprobs should be handled on the prefill engine.