-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Pipe to multiple writable streams doesn't throttle and may blow the memory (v4) #6491
Comments
Yes, that sounds a lot like the bug fixed in #6023, and PR is labelled lts-watch-4.x, so I think this is primarily a question to @nodejs/lts regarding when it might be included? |
I imagine it should hit in the next release or the one right after. @thealphanerd, were you going to be spinning up a new v4 release next week? |
I've backported that change to |
@thealphanerd Seems like it was included in v4.4.4 release although not in the release notes. |
@guymguym it was included in the change log but not in notable changes as it was a bugfix |
Sure, and not that it's really important but I don't see it in the log. |
@guymguym my mistake... I was mixing up two different streams related changes... (this is what I get for multi-tasking soon after waking up) This change is in v4.x-staging but was not included in the security release You should expect this change to land in v4.4.5 |
LOL :) great thanks! |
Closing this as the bugfix should be included in v4.4.5. |
Hi
See below the code to reproduce and the output.
With node v0.10 or >=v5.11 the issue doesn't happen.
I think this is the commit that fixed it - #6023
Should it be backported to v4 LTS?
The test case is when piping from single readable to multiple writable streams.
One writable stream is a realistic one that has some delay to process the data.
The other writable stream is used for progress reporting, so calls its callback immediately.
With nodejs v4 the behavior is that adding a fast writable pipe will consume the reader completely into memory which can blow the process.
Thanks!
Guy
The code to reproduce:
Here is the output:
The text was updated successfully, but these errors were encountered: