You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
streams: backpressure is broken in multi push cases on master #19601
Try out the following test case with a fast readable stream, and a slow writable one that are piped together. There seems to be a bug in master where the readable one is not backpressured properly when multiple pushes are done in the read fn.
I'm traveling this week, so I will have time to have a look next week, or this week during my flights.
If someone beats me to fixing this earlier, please don't wait for me.
@addaleax it's definitely that line. However, something else is at play: needReadable was always true in there. I'll keep everybody posted.
On Mon, Mar 26, 2018, 08:48 Matteo Collina ***@***.***> wrote:
I'm traveling this week, so I will have time to have a look next week, or
this week during my flights.
If someone beats me to fixing this earlier, please don't wait for me.
@addaleax <https://github.com/addaleax> it's definitely that line.
However, something else is at play: needReadable was always true in
there. I'll keep everybody posted.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#19601 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAW_VQK1GrJ24_N-5rVe8p05XJK1tlo2ks5tiI9GgaJpZM4S6VoO>
.
I think it should be state.needReadable = state.needReadable && !state.flowing && !state.ended. It fixes the test and it passes dicer test suite. Doing a full test run right now.
Activity
mafintosh commentedon Mar 25, 2018
/cc @nodejs/streams @mcollina
addaleax commentedon Mar 25, 2018
Confirmed that this is coming from 1e0f331, and in particular I believe that
state.needReadableis being set totruehere when it shouldn’t:node/lib/_stream_readable.js
Line 539 in cde98ce
mcollina commentedon Mar 26, 2018
I'm traveling this week, so I will have time to have a look next week, or this week during my flights.
If someone beats me to fixing this earlier, please don't wait for me.
@addaleax it's definitely that line. However, something else is at play:
needReadablewas alwaystruein there. I'll keep everybody posted.mafintosh commentedon Mar 26, 2018
mcollina commentedon Mar 26, 2018
I think it should be
state.needReadable = state.needReadable && !state.flowing && !state.ended. It fixes the test and it passes dicer test suite. Doing a full test run right now.mcollina commentedon Mar 26, 2018
Here is my proposed fix: #19613.
stream: fix backpressure when multiple sync