Repository navigation
fix(dispatch): report available capacity after synchronous rejection - #153
Merged
ronag merged 4 commits intoNov 18, 2026
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The change affects the public dispatch boolean contract across DispatcherBase, pool propagation, custom implementations, and closed or busy edge cases that local tests do not fully cover, so maintainer validation is warranted.
No open issues 🎉
What changed in this PR
Fixes dispatcher backpressure reporting when request validation fails synchronously, ensuring rejected requests report available capacity while still delivering the original error to the handler.
Changes:
- Return
trueafter synchronous dispatch errors. - Simplify pool backpressure handling by relying on dispatcher return values.
- Remove the obsolete dispatch-failure symbol.
- Add regression coverage for direct-client and pool behavior.
| File | Description |
|---|---|
| test/pool.js | Adds regression coverage for direct-client and pool behavior after synchronous request rejection. |
| lib/dispatcher/pool-base.js | Simplifies pool backpressure handling by relying directly on child dispatcher return values. |
| lib/dispatcher/dispatcher-base.js | Reports available capacity after delivering synchronous dispatch errors. |
| lib/core/symbols.js | Removes the obsolete dispatch-failure symbol. |
Review effort: Lite
ronag
marked this pull request as ready for review
November 18, 2026 11:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Confidence Reproduced on 13.3.0. Severity High for a dispatcher caller awaiting drain. Likelihood Possible with direct dispatch and an invalid request. An idle Client reports backpressure when it rejects a request synchronously. A caller can then wait indefinitely for capacity that was never used.
Align the public return value with nodejs#6180. The handler still receives the original error. The pool continues to honor its existing failure marker for custom children, and genuine backpressure still triggers normal drain handling.
The direct-client regression failed before the change and passed afterwards. The pool lifecycle, pre-abort, concurrent body consumption and 304 connection-reuse suites passed, along with lint and the public type checks. No dependency version changes are included.