Repository navigation
Conversation
Let each snapshot own cancellation through response-body consumption and release its upstream connection when replaced or disarmed. Preserve the existing timeout and failure policy, including early Node 20 support. Fixes ranxianglei#7142
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — this is the only open [PR] row for thread #7142; the only other open keepalive PR is #6650 (stream-keepalive watchdog re-arm — different subsystem, different mechanism). Cited prior work verified: #6078 (stale response-body isolation) and #6739 (invalidated cadence-timer cancellation) are both merged/closed and address adjacent gaps — neither aborts an already in-flight upstream exchange, matching the PR's claim. 标签: Review of PR #7143 (head ① Direction — the root cause in #7142 is real and correctly located: ② Regression review — existing behaviors on the touched path, itemized:
③ Code — verified by reading the full file at both heads:
④ Test validity — real
⑤/⑤b Diff & code cleanliness — 2 files (+266/−42), every line on-topic, no whitespace churn; naming/comments/constants consistent with the file; no new dependencies ( CI (mirror cache, 10:59:59Z snapshot): 14 success / 11 skipped / 5 in progress / 0 failed. Verdict: no blocking issues — mergeable once the remaining CI shards are green. The two side-effect behavior changes (②.2/②.3) deserve a line in the PR body for future readers; the fix itself is minimal, correctly layered, and properly pinned. 结构化八问(供人类审阅):
结论:review 通过,无阻塞问题;CI 全绿后 owner 可合并。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) CI final state (live-verified, ~11:25 UTC) — my earlier CI line was from an in-progress mirror snapshot; it has since resolved:
No changes to my verdict: no blocking issues; CI fully green. |
|
(ai: OpenAI/GPT-6 Astra Pro) The requested body clarification is now in place: I found a separate required-check blocker on the unchanged heads of #7038, #7133, #7138, #7141, #7143 and #7147. For #7143, the 12:21 plan job records There is also a matrix/required-context mismatch: the normal core matrix supplies 11 test names, while master requires 14, including Windows Node 24 shards 1–3. Those three are absent from the core run even when all 11 pass, as on #7038. The existing Could a maintainer apply the existing Primary contributor: Afloat16. |
Fixes #7142.
Problem
A disarmed or superseded keepalive snapshot loses its registry entry and cadence timer, but its active HTTP request remains alive until the existing 60-second deadline. A slow upstream can therefore keep a connection occupied after the snapshot is no longer useful.
The regression uses a real loopback HTTP server and an undici dispatcher limited to one connection. The old ping is held either before headers or during response-body consumption. After invalidation, the unchanged implementation prevents an ordinary request from reaching that same upstream before the test deadline.
Change
Give each in-flight snapshot its own AbortController. Replace or delete registry ownership before aborting the old request, so its rejection cannot alter the replacement's failure count or schedule. Keep the controller active through
response.text()and clean up infinally.pingInFlightnow remains true through response-body consumption, so the existing five-second busy-skip guard also covers that phase and prevents another ping from starting while the previous body is still being read.The timeout value remains 60 seconds. Its signal forwards the timeout reason to the snapshot controller through response-body consumption, with the listener removed after completion. This avoids requiring
AbortSignal.any, which is not available throughout the declared Node >=20 range.The ping request body, cache eligibility, retry budget, cadence and configuration retain their existing definitions. An ineligible same-credential forward that leaves the snapshot unchanged also leaves its active ping running.
Validation
548e3960: replacement, disabling, credential rotation and concurrency eviction, each while waiting for headers and while consuming the body. Two unchanged-snapshot controls pass on that baseline.AbortSignal.anytemporarily to cover the compatibility requirement.cache-keepalive,keepalive-body-failures,keepalive-breakpoint-scopeand the new regression file pass, with no skips.npm run typecheck,npm run build, the test-import-graph guard andgit diff --checkpass.Prior work and scope
Checked all 258 prior fork refs, the seven actual keepalive source variants, and relevant upstream open/closed issues and PRs. #6078 isolates stale response decisions; #6739 cancels invalidated cadence timers. Neither cancels the active upstream HTTP exchange addressed here.
This change is limited to the shared host keepalive lifecycle and its regression tests. It changes no wire/message shape, persisted state, configuration, model-facing text, kernel code or compression-mode-specific path.
Primary contributor: Afloat16.