-
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
stream: regression in v14, this.push(null) in Transform doesn't emit end #35926
Comments
@nodejs/streams @ronag |
Confirmed, this is a bug, just tested in the latest v14 and on master. |
In this case... shouldn't it actually fail with If find this case quite problematic. |
Problem is data not processed in consumer at all. Handlers, which have to call end/destroy are not reached. Looks like data buffered somewhere until stream end. https://github.com/nodeca/probe-image-size/blob/master/stream.js - full source if anyone interested. The same with generator-based source: async function * generate() {
for (;;) {
yield Buffer.alloc(20000);
}
}
let src = Readable.from(generate()); |
No. I think we'd need to bisect this if you do not have a suspect. |
Haven't started digging yet. Trying to understand how it should work first.
I'm not sure i entirely agree with this. I suspect we would need to update |
let's get the fix in and then do a follow-up refactor. |
Decide the return status of writeOrBuffer before calling stream.write which can reset state.length Add unit test for #35926 Refs: #35926 PR-URL: #35941 Fixes: #35926 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Backport Decide the return status of writeOrBuffer before calling stream.write which can reset state.length Refs: nodejs#35941 Fixes: nodejs#35926
Backport Decide the return status of writeOrBuffer before calling stream.write which can reset state.length Refs: nodejs#35941 Fixes: nodejs#35926
Decide the return status of writeOrBuffer before calling stream.write which can reset state.length Add unit test for #35926 Refs: #35926 Backport-PR-URL: #36375 PR-URL: #35941 Fixes: #35926 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Decide the return status of writeOrBuffer before calling stream.write which can reset state.length Add unit test for #35926 Refs: #35926 Backport-PR-URL: #36375 PR-URL: #35941 Fixes: #35926 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Decide the return status of writeOrBuffer before calling stream.write which can reset state.length Add unit test for #35926 Refs: #35926 Backport-PR-URL: #36375 PR-URL: #35941 Fixes: #35926 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]>
end
event is emitted bydst
, transform stops, source pauses.end
event does not get emitted bydst
, transform runs indefinitely.The text was updated successfully, but these errors were encountered: