fix: release request tracking when resolver ends early - #365
Open
Streetblock wants to merge 1 commit into
Open
Streetblock wants to merge 1 commit into
Streetblock wants to merge 1 commit into
Conversation
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.
Dropping a server
RequestResolver, cancellingresolve_request()while waiting for headers, or returning an error before constructing aRequestStreamleaves the stream ID inConnection::ongoing_streams. The completion guard is currently created only after the initial HEADERS frame has been read and decoded.Create the existing
RequestEndguard when the resolver is created and move it intoRequestStreamon successful resolution. This preserves the existing split-stream lifetime behavior and also notifies the connection when resolution ends early. Header timeout policy remains with the caller; the method documentation now states that explicitly.Regression tests use a local QUIC peer sending an incomplete HEADERS frame and cover timeout cancellation, dropping an unpolled resolver, and an incomplete stream ending before header resolution. They assert that the connection removes the ongoing stream after processing completion notifications.
Validation:
1f3d529withcancelled resolver retained in ongoing_streamsand passes with this fix.cargo test -p h3 --all-featurescargo fmt --all -- --checkThis fixes resolver lifecycle accounting; it does not add a runtime-specific timer or set a server timeout policy.