Fix mesh reliable echo and stale membership#2041
Open
tlongwell-block wants to merge 1 commit into
Open
Conversation
Co-authored-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co>
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
Fix both inter-relay mesh failures observed on
bb-public:Root cause
Reliable stream timeout
The inbound reliable-stream intake loop awaited the session payload before returning to accept and dispatch later frames. The payload therefore could not reach the session receiver that was waiting to echo it, leaving the caller to time out after a successful stream open.
This change dispatches each accepted session concurrently, allowing the intake loop to continue receiving frames while preserving per-session processing.
Zombie gossip membership
Membership was insert-only. Expired Redis ready records could not remove peers already learned through gossip, and surviving relays continually re-advertised those stale records. Gossip application also marked peers
Connectedeven when the record was learned third-hand rather than through an actual transport connection.This change:
Live peers remain self-healing through periodic Redis ready-record publication.
Validation
cargo test -p buzz-relay-mesh— 34 passedcargo clippypassed for affected packagesLive local relay proof
Ran two actual
buzz-relayprocesses with mesh/demo enabled, separate HTTP/health/QUIC ports, and shared Redis:owned.forwardedwith a byte-identical payload.streams_receivedincreased by 1.streams_openedincreased by 1.Both relay processes and temporary Redis state were cleaned up after the smoke test.