-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
[REG 20.9->20.10] stream: Pipe is stopped after error on another pipe from the same source #53185
Comments
I'm not sure I would consider this a bug. The stream should stop IMO. However, it is a semver-major change of behavior that should not have landed on v20.0. |
Why should the stream stop if it still has other listeners on 'data'? |
when piping to multiple destinations the data flow should not be faster than the slowest destintation (this is the behavior in the non failing case). A failed destination is no longer consuming and should therefore stop the flow. Just like in the non-error flow. |
I see. It's worth at least documenting this change in "Notable changes". |
I have a rough feeling this is not what the user would expect. If I'm piping to two streams, I don't want one of the two pipes to end, surprisingly, because the other had an unrelated failure. While we must slow down at the pace of the slowest consumer, we should definitely not break the other user. I think we should consider either reverting or fixing this. Wdyt @ronag? Note that this kind of double-piping is problematic in many other ways, so it might not be useful to revert. If we consider this behavior as ok, we should consider adding a |
I'll have a look if we can fix this so it behaves as it used to. |
Version
20.13.1
Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem
stream
What steps will reproduce the bug?
Output with 20.9.0:
Output with 20.10.0:
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
I expect the stream to keep draining (at least when it still has listeners to
data
).What do you see instead?
The stream is paused.
Additional information
Bisected to #50014.
Related bug:
highWaterMark: 0
andobjectMode: false
is broken since node v20.10.0 #51930The text was updated successfully, but these errors were encountered: