Repository navigation
Conversation
Bidirectional DATA transfers can deadlock when a pending control-frame write prevents both peers from reading their sockets. Queue bounded control output behind DATA and CONTINUATION frames. Preserve FIFO order, pre-ACK frame-size limits, and Pending backpressure when the queue is full. Reuse writer-owned scratch storage while keeping HPACK compression state separate and standalone frame APIs available. Validation: 726 tests passed, 14 ignored; refactored connection regressions fail at their read-progress assertions on the upstream baseline. Formatting, Clippy, all-feature and fuzz-interface checks pass. Runtime logic is unchanged from the TLS/MSRV/h2spec and performance-validated candidate; strict zero performance regression remains unverified.
Emit the existing codec debug event for controls queued behind blocked writes. Share the client/server pending-poll helper without changing test scenarios or assertions. Signed-off-by: rleungx <[email protected]>
This branch has not been deployed
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.
Bidirectional bulk transfers can deadlock when pending PONG, PING, or SETTINGS writes prevent both peers from reading. Queue control output behind DATA and CONTINUATION frames so reads can continue while the control queue has capacity.
Preserve control FIFO order and the frame-size limit for fragments preceding a SETTINGS ACK. Reuse writer-owned header scratch storage while keeping HPACK compression state separate and standalone frame encoding APIs available. The queue is bounded to 16 KiB and returns
Pendingat capacity, with no new connection-close condition.Fixes #975.
Validation:
Release measurements of the same runtime code on macOS arm64 with Rust 1.92 (8 interleaved base/head pairs; medians):
These samples did not detect a significant throughput or latency slowdown, but intervals permit small regressions. Linux x86_64 diagnostics measured about one extra instruction per 64-byte DATA frame (+0.25%) and 1.25–1.83% fewer instructions for 16 KiB frames. Client/server connection sizes remained 1,280 bytes on both platforms, with matching serial allocation counts. This does not establish universal zero overhead.