Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
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?
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ronag commented Nov 7, 2021
@nodejs/startup @addaleax |
mcollina left a comment
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.
| constcb=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?
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.
There is a timing difference due to how streams are resumed with 'readable' event.
Uh oh!
There was an error while loading. Please reload this page.
4d68da2 to 3d0d042Comparenodejs-github-bot commented Nov 10, 2021
ronag commented Nov 10, 2021
@nodejs/streams |
mcollina left a comment
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
lpinca commented Nov 10, 2021
What happens if the source is already piped to another destination via |
ronag commented Nov 10, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Combining pipe and read is not a good idea... so no |
mcollina commented Nov 11, 2021
It will work but the consumption will be driven by pipeline as the @ronag could you add a test for this case? |
lpinca commented Nov 11, 2021
If my understanding is correct, then consumption will be driven by the fastest destination, not the slowest, potentially messing up backpressure handling, right? |
mcollina commented Nov 11, 2021
No, not really. The same happens if you mix async iterators and Unfortuunately this is the only way |
ronag commented Nov 11, 2021
I don't really see what a test here contributes? It uses an existing api. |
addaleax commented Nov 18, 2021
Fwiw, I marked this semver-major because it’s a big breaking change to stop using
The latter sounds a lot safer to me. |
ronag commented Nov 18, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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? |
nodejs-github-bot commented Nov 19, 2021
ronag commented Nov 19, 2021
nodejs-github-bot commented Nov 22, 2021
nodejs-github-bot commented Nov 27, 2021
aduh95 commented Apr 3, 2022
This needs a rebase. |
aduh95 commented Sep 8, 2022
This needs a rebase, if we want to still merge it. |
No description provided.