GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — fix: preserve h2 queue on out-of-order completion by mcollina · Pull Request #5410 · nodejs/undici Conversation
Member
Fixes: #5404 HTTP/2 streams can complete out of order. The H2 completion path was advancing This changes H2 request finalization to remove the actual completed request from the running queue section, preserving other running requests. It also skips stale Tested with:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
mcollina
requested review from
metcoder95 and
trivikr
and removed request for
metcoder95
|
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #5410 +/- ## ========================================== - Coverage 93.24% 93.23% -0.01% ========================================== Files 110 110 Lines 36825 36842 +17 ========================================== + Hits 34336 34351 +15 - Misses 2489 2491 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
764c392 to
565bbd7
Compare
Signed-off-by: Matteo Collina <[email protected]>
565bbd7 to
04b4b68
Compare
There was an error while loading. Please reload this page.
…#5618) Backport of #5410 (and the fast path from #5569). HTTP/2 completes out of order, but every completion site advanced the running index blindly: client[kQueue][client[kRunningIdx]++] = null so whichever request happened to sit at the head was retired instead of the one that actually finished. With two streams in flight, completing the second one clears the first's slot while the second stays in the running window for good: after /second queue=[null, "/second"] runningIdx=1 pendingIdx=2 after /third queue=[null, null, "/third"] runningIdx=2 pendingIdx=3 The still-running /first is gone from the queue and two finished requests are counted as running forever, so kRunning never returns to zero. Since _resume() stops dispatching once kRunning reaches the concurrency limit, a client accumulating these eventually stops sending anything. Port completeRequest() from main: retire the request by identity, keeping the O(1) in-order fast path, and splice it out when it finished out of order. Cleared slots can now appear in the queue, so the paths that walk it skip them, as they do on main. Refs: #5404 Refs: #5410 Refs: #5569 Claude-Session: https://claude.ai/code/session_01A49JamgF2TkZHu5h58ChUM Signed-off-by: Matteo Collina <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
#4458) Event POSTs with bodies over 1 MiB (run_started carrying a multi-MiB run input, large event batches) could not be re-buffered by the H2 multiplexing interceptor, so undici held them until the connection had zero in-flight streams and stopped its queue behind them. On busy instances they hung until the replay budget or maxDuration ran out. - Send those bodies over an HTTP/1.1 agent instead. - Upgrade undici to 7.30.0, which fixes the phantom running slot a failed HTTP/2 stream left on its connection (nodejs/undici#5410, #5569) and honors headersTimeout on HTTP/2. - Bound events requests with 60s header/body deadlines instead of undici's 300s defaults, which outlasted the 240s replay budget. - Retry event-log reads (GET only) whose stream the peer reset with ERR_HTTP2_STREAM_ERROR. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
#4458) Event POSTs with bodies over 1 MiB (run_started carrying a multi-MiB run input, large event batches) could not be re-buffered by the H2 multiplexing interceptor, so undici held them until the connection had zero in-flight streams and stopped its queue behind them. On busy instances they hung until the replay budget or maxDuration ran out. - Send those bodies over an HTTP/1.1 agent instead. - Upgrade undici to 7.30.0, which fixes the phantom running slot a failed HTTP/2 stream left on its connection (nodejs/undici#5410, #5569) and honors headersTimeout on HTTP/2. - Bound events requests with 60s header/body deadlines instead of undici's 300s defaults, which outlasted the 240s replay budget. - Retry event-log reads (GET only) whose stream the peer reset with ERR_HTTP2_STREAM_ERROR. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Pranay Prakash <[email protected]>
#4458) (#4461) Event POSTs with bodies over 1 MiB (run_started carrying a multi-MiB run input, large event batches) could not be re-buffered by the H2 multiplexing interceptor, so undici held them until the connection had zero in-flight streams and stopped its queue behind them. On busy instances they hung until the replay budget or maxDuration ran out. - Send those bodies over an HTTP/1.1 agent instead. - Upgrade undici to 7.30.0, which fixes the phantom running slot a failed HTTP/2 stream left on its connection (nodejs/undici#5410, #5569) and honors headersTimeout on HTTP/2. - Bound events requests with 60s header/body deadlines instead of undici's 300s defaults, which outlasted the 240s replay budget. - Retry event-log reads (GET only) whose stream the peer reset with ERR_HTTP2_STREAM_ERROR. Signed-off-by: Pranay Prakash <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
HTTP/2: TypeError: Cannot read properties of null (reading 'onResponseError')
There was an error while loading. Please reload this page.