stream: abort pending single-source merge reads#64445
Open
trivikr wants to merge 3 commits into
Open
Conversation
Make the single-source merge path abort-aware so signal cancellation rejects a pending read and closes the active source iterator. Handle synchronous iterator return values when marking aborted cleanup as handled. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64445 +/- ##
========================================
Coverage 90.23% 90.23%
========================================
Files 741 741
Lines 241375 241609 +234
Branches 45483 45592 +109
========================================
+ Hits 217800 218026 +226
- Misses 15129 15148 +19
+ Partials 8446 8435 -11
🚀 New features to boost your workflow:
|
jasnell
reviewed
Jul 12, 2026
jasnell
reviewed
Jul 12, 2026
jasnell
approved these changes
Jul 12, 2026
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
|
cc @jasnell I added comments as suggested. Can you please re-approve so that CI can be run? |
5fac436 to
1ee6017
Compare
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.
Fixes: #64444
The single-source
merge()path uses a plainfor awaitloop, so abortingduring a pending read neither rejects
next()nor closes the source iterator.Make the single-source path abort-aware before normalization so cancellation
reaches the active source iterator. Also allow the shared abort cleanup helper
to handle iterators whose
return()method returns a synchronous iteratorresult.