From 743ce88bc5f5bf02a84a7f07926f3b6a9aecbd3d Mon Sep 17 00:00:00 2001 From: cctry Date: Tue, 23 Jun 2026 00:18:01 -0700 Subject: [PATCH] Fix flaky optimistic prefill retry test (#28995) Co-authored-by: cctry --- python/sglang/srt/disaggregation/prefill.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/disaggregation/prefill.py b/python/sglang/srt/disaggregation/prefill.py index 5f989b24c..f73e5b52a 100644 --- a/python/sglang/srt/disaggregation/prefill.py +++ b/python/sglang/srt/disaggregation/prefill.py @@ -361,7 +361,10 @@ class PrefillBootstrapQueue: indices_to_remove.add(i) req.time_stats.set_wait_queue_entry_time() elif poll == KVPoll.WaitingForInput: - if not self.finalize_bootstrap(req): + if should_force_retry(req): # skip checking for testing + if not self.ensure_metadata_buffer(req): + continue # no more metadata buffer + elif not self.finalize_bootstrap(req): continue bootstrapped_reqs.append(req) indices_to_remove.add(i)