diff --git a/python/sglang/srt/mem_cache/unified_radix_cache.py b/python/sglang/srt/mem_cache/unified_radix_cache.py index 3fb717ee18..4dd52bc3d4 100644 --- a/python/sglang/srt/mem_cache/unified_radix_cache.py +++ b/python/sglang/srt/mem_cache/unified_radix_cache.py @@ -2521,6 +2521,9 @@ class UnifiedRadixCache(BasePrefixCache): self.dec_host_lock_ref(last_host_node_id, anchor_lock_params) del self.ongoing_prefetch[request] + # Success path retires here instead of _retire_ongoing_prefetch(); the + # ready-latency metric must cover it or every L3 hit goes unmeasured. + self._observe_prefetch_ready(request, loaded_from_storage > 0) self.cache_controller.prefetch_tokens_occupied -= len(prefetch_key) self.prefetch_loaded_tokens_by_reqid[request] = loaded_from_storage