-
Notifications
You must be signed in to change notification settings - Fork 30k
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
stream: fix disparity between buffer and the count #15661
Conversation
This changes the disparity of bufferedRequestCount and the actual buffer on file _stream_writable.js Fixes: nodejs#6758
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. It would be nice to address the nit - otherwise this could be done while landing.
'use strict'; | ||
const common = require('../common'); | ||
const Stream = require('stream'); | ||
//this test ensures that the _writeableState.bufferedRequestCount and |
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.
Nit - would you be so kind upper case the first letter and also add a whitespace after //
?
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.
Sure no problem, would there be any other style changes you'd think might be appropriate? If not I'll just commit with that one change and squash if required/requested.
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.
In the comment below, please also add a whitespace on each line after //
. Besides that everything is LGTM.
ping @nodejs/streams |
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 with CI green
Landed in 34dbc9e |
This changes the disparity of bufferedRequestCount and the actual buffer on file _stream_writable.js PR-URL: #15661 Fixes: #6758 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This changes the disparity of bufferedRequestCount and the actual buffer on file _stream_writable.js PR-URL: #15661 Fixes: #6758 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This changes the disparity of bufferedRequestCount and the actual buffer on file _stream_writable.js PR-URL: #15661 Fixes: #6758 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This changes the disparity of bufferedRequestCount and the actual buffer on file _stream_writable.js PR-URL: nodejs/node#15661 Fixes: nodejs/node#6758 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This changes the disparity of bufferedRequestCount and the actual buffer on file _stream_writable.js PR-URL: #15661 Fixes: #6758 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This lands cleanly on v6.x, but I think it might make sense to wait a bit longer to see if it causes any issues due to how fragile streams could be. Please lmk if you think it should make it into the next release |
ping @mcollina and @nodejs/streams should this be included in the next 6.x? |
@MylesBorins yeah, go ahead and backport. It's safe. |
This changes the disparity of bufferedRequestCount and the actual buffer on file _stream_writable.js PR-URL: #15661 Fixes: #6758 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This changes the disparity of bufferedRequestCount and the actual buffer on file _stream_writable.js PR-URL: #15661 Fixes: #6758 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This changes the disparity of bufferedRequestCount and the actual buffer
on file _stream_writable.js
Fixes: #6758
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
Stream Writable
Note: I introduced the test in the sequential subfolder because I couldn't think of another way to test that part of the code without using a timeout (like in the example of the issue thread).