Artery: give the single-lane outbound stream the same inner restart as the multi-lane path - #8479
Merged
Merged
Conversation
The lanes>1 outbound path already wraps its merged socket connection in RestartFlow.OnFailuresWithBackoff so a transient connect/write fault retries the socket alone, without tearing down the lane chains and losing whatever they had in flight. The default outbound-lanes=1 path (ordinary and large-message streams materialized through MaterializeOutboundStream) had no equivalent: a transient socket fault tripped the stream's kill switch directly and discarded whatever the upstream handshake/encode stages already had in flight, falling back to the slower outer restart tier for every transient fault. Wrap that connection the same way, with the same backoff settings and the same max-inner-restarts constant used by the lanes path. The stream-id preamble moves inside the restart factory so every reconnect resends the connection header first, matching how the lanes path already handles it. The per-stream kill switch and WatchTermination keep their existing position and semantics. Builds Akka.Remote clean with 0 warnings. All existing Artery unit specs pass (253/253).
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.
Closes #8477.
The multi-lane outbound path wraps its merged socket connection in
RestartFlow.OnFailuresWithBackoff, so a transient TCP fault (connection refused on a fresh materialization, a port-rebind race, a reset mid-burst) reconnects without tearing down the stream and losing what the handshake/encode stages held in flight. The default single-lane path - the common case - wired the rawTcp.OutgoingConnectiondirectly: the same fault tripped the stream's kill switch and discarded the in-flight elements.Fix: wrap the single-lane connection with the identical restart settings and max-inner-restarts bound the multi-lane path uses. The stream-id preamble moves inside the restart factory so every reconnect resends the connection header, matching the multi-lane wiring. The per-stream kill switch and
WatchTerminationkeep their existing positions and semantics; the materialized-value chain is unchanged.All 253 Artery unit tests pass;
Akka.Remotebuilds clean under-warnaserror.