Repository navigation
Fix multicast delivery ordering under concurrent demand - #60
Merged
Merged
Conversation
Broadcast each upstream result before another consumer can advance the iterator, preventing values from being reordered or overtaken by termination. Add concurrent subscriber regressions for normal completion and failure.
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.
Concurrent multicast subscribers could advance upstream before the previous result was broadcast, allowing values to arrive out of order or termination to overtake an element. This caused the intermittent CI failure where all three subscribers received
[1, 1]instead of[1, 1, 1].Broadcast each result under the multicast state lock before making the upstream iterator available again. Add regression tests with eight registered subscribers and 100 distinct values, repeated 20 times for both normal completion and failure, and update the changelog. No public API or dependency changes.
Validation:
git diff --checkpassed.Based on the latest
mainafter #59; this PR contains only the multicast fix.