-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
stream: adjust src hwm when pipelining #40751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@nodejs/startup @addaleax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A doc change is needed. This also change/simplify the pipe logic and I like it.
I'm not sure I would backport it immediately to LTS, but I'm not sure it's strictly semver-major either.
| const cb = common.mustCall((err) => { | ||
| assert.strictEqual(err.name, 'AbortError'); | ||
| assert.strictEqual(res, '012345'); | ||
| assert.strictEqual(res, '01234'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this?
4d68da2 to
3d0d042
Compare
All reactions
Sorry, something went wrong.
|
@nodejs/streams |
All reactions
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
All reactions
|
What happens if the source is already piped to another destination via |
All reactions
Sorry, something went wrong.
|
Combining pipe and read is not a good idea... so no |
All reactions
Sorry, something went wrong.
It will work but the consumption will be driven by pipeline as the @ronag could you add a test for this case? |
All reactions
Sorry, something went wrong.
If my understanding is correct, then consumption will be driven by the fastest destination, not the slowest, potentially messing up backpressure handling, right? |
All reactions
Sorry, something went wrong.
No, not really. The same happens if you mix async iterators and Unfortuunately this is the only way |
All reactions
Sorry, something went wrong.
I don't really see what a test here contributes? It uses an existing api. |
All reactions
-
👍 1 reaction
Sorry, something went wrong.
|
Fwiw, I marked this semver-major because it’s a big breaking change to stop using
The latter sounds a lot safer to me. |
All reactions
-
👍 1 reaction
Sorry, something went wrong.
|
IMO if we merge this we are moving towards some from of deprecation of pipe. If we don’t merge this we’re in this inconsistent state where sometimes we use pipe and sometimes not and the situation is quite unpredictable for our users. I think we have to choose which api we recommend and stick with it in core at least. readable is simpler @mcollina wdyt? |
All reactions
Sorry, something went wrong.
All reactions
Sorry, something went wrong.
|
CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2793/ |
All reactions
Sorry, something went wrong.
All reactions
Sorry, something went wrong.
All reactions
Sorry, something went wrong.
|
This needs a rebase. |
All reactions
Sorry, something went wrong.
|
This needs a rebase, if we want to still merge it. |
All reactions
Sorry, something went wrong.
Reviewers
lpinca
mcollina
jasnell
At least 1 approving review is required to merge this pull request.
Assignees
No one assignedLabels
Projects
Milestone
No milestoneDevelopment
Successfully merging this pull request may close these issues.
No description provided.