stream: fix pipeline function tail deadlock - #65559
Open
dayun6530 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Dayun <dlekdbs6530@gmail.com>
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65559 +/- ##
==========================================
+ Coverage 90.05% 90.07% +0.01%
==========================================
Files 751 751
Lines 254420 254430 +10
Branches 47975 47981 +6
==========================================
+ Hits 229121 229169 +48
+ Misses 16483 16437 -46
- Partials 8816 8824 +8
🚀 New features to boost your workflow:
|
ronag
approved these changes
Aug 26, 2026
Collaborator
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: #40685
When the final pipeline entry is a function,
pipelineImpl()creates aninternal
PassThroughproxy. In the promise-based pipeline API, that proxyis not exposed to the user, so its readable side can remain unconsumed.
Once the proxy buffer reaches its high water mark, backpressure prevents
the pipeline from completing and the returned promise never resolves.
Resume the internal proxy when the final pipeline entry is a function.
This also handles the array form of
pipeline()while preserving theexisting behavior for user-provided destination streams.
Tests:
./node test/parallel/test-stream-pipeline.jsmake lint