-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Transform stream misses final readable event for small inputs #25810
Comments
/cc @nodejs/streams |
Lines 233 to 238 in 4b6e4c1
|
I don't think this is a bug. This is working exactly as expected. In the first case you are ending the stream synchronously, so there is only 1 readable event. In the second case, it's an asynchronous operation, so there are two |
Quoting the stream documentation:
(emphasis added) |
I digged some more. This is a regression from Node 8. |
This is happening when another |
Not sure whether related or not: when I replace the dummy |
This is odd, it seems some sort of unexpected bug/interaction with Transform. I'm looking into it. |
This work as expected on Node.js 8 and 9 but not on 10 so we had a regression. |
Bisecting points to this commit: 1e0f331 |
Fixed in e95e7f9 |
Fixes: nodejs#25810 PR-URL: nodejs#26059 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Reopening because of #26617. Sigh, my fix broke stuff. |
In nodejs#26059, we introduced a bug that caused 'readable' to be nextTicked on EOF of a ReadableStream. This breaks the dicer module on CITGM. That change was partially reverted to still fix the bug in nodejs#25810 and not break dicer. See: nodejs#26059 Fixes: nodejs#25810
Fixed in 269103a |
In #26059, we introduced a bug that caused 'readable' to be nextTicked on EOF of a ReadableStream. This breaks the dicer module on CITGM. That change was partially reverted to still fix the bug in #25810 and not break dicer. See: #26059 Fixes: #25810 PR-URL: #26643 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fixes: nodejs#25810 PR-URL: nodejs#26059 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In nodejs#26059, we introduced a bug that caused 'readable' to be nextTicked on EOF of a ReadableStream. This breaks the dicer module on CITGM. That change was partially reverted to still fix the bug in nodejs#25810 and not break dicer. See: nodejs#26059 Fixes: nodejs#25810 PR-URL: nodejs#26643 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fixes: #25810 PR-URL: #26059 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In #26059, we introduced a bug that caused 'readable' to be nextTicked on EOF of a ReadableStream. This breaks the dicer module on CITGM. That change was partially reverted to still fix the bug in #25810 and not break dicer. See: #26059 Fixes: #25810 PR-URL: #26643 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
A Transform stream that transforms the entire input in one shot will generate just one
readable
event, when it should be two (one for data and one for EOS).The output of this example is:
But it should be
Using a larger input stream (like the commented out line) correctly produces the last
readable
event.The text was updated successfully, but these errors were encountered: