Repository navigation
test(mux): name the error-GOAWAY linger routing regression - #1876
Merged
Merged
Conversation
`an_error_goaway_linger_pending_on_close_notify_releases_before_pending_links` failed on the old `Connection::lingers_after_error_goaway` gate only through `RemoveOnlyProxy`'s generic "closing a backend only removes its session". It now runs against a dedicated `NoRoutingProxy` stub whose routing view and registration panic with "pending_links routed a stream of an error-GOAWAY linger"; what the test asserts is unchanged. `Mux::release_streams_and_backends_for_error_linger` selects the streams it recycles by `metrics.start.is_some()`. A stream in `StreamState::Link` or `Linked` always carries its start: every first entry into `Link` arms it through `SessionMetrics::service_start`, every other entry re-links a stream that was already linked, `Linked` is reached only from `Link`, and no `SessionMetrics::reset` leaves a stream in either state. A debug-only pre-condition now states that invariant before the early return, where the existing post-condition could not see it. Refs: #1875 Signed-off-by: Florentin Dubois <[email protected]>
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.
Summary
Follow-up to #1875 review notes.
an_error_goaway_linger_pending_on_close_notify_releases_before_pending_linksfailed on the old gate only throughRemoveOnlyProxy::sessions' genericunreachable!("closing a backend only removes its session"). It now uses a test-onlyNoRoutingProxywhose routing methods panic with "pending_links routed a stream of an error-GOAWAY linger". Its assertions are unchanged.LinkorLinkedalways carriesmetrics.start: everySessionMetrics::reseteither moves the stream out ofLink/Linkedor re-arms the start (create_stream), first entries intoLinkfollowservice_start(), re-links come only throughbackend_streams, whichunlink_streamcleans, andLinkedcomes only fromlink_streambehind theLinkguard.release_streams_and_backends_for_error_lingernow states this with adebug_assert!before its early return, so a future violation cannot skip the release silently. No behaviour change in release builds.Refs #1875
Verification
pending_links routed a stream of an error-GOAWAY linger; green with the gate.cargo test -p sozu-lib --no-default-features --features crypto-ring(1612 passed, debug assertions on), clippy--all-targets -D warnings,cargo +nightly fmt --check,check_doc_citations.py: green.