-
Notifications
You must be signed in to change notification settings - Fork 1.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
fix(NODE-6394): pause message stream when not listening for events #4249
Conversation
fcfbad1
to
13a49c9
Compare
Failures unrelated |
any chance of a patch release until 6.10 is out? Maybe a 6.9.1? Especially since 6.10 removes mongo 3.6 support, some won't have option to upgrade. |
Based on the MongoDB Software Lifecycle Schedules MongoDB 3.6 reached EOL in April 2021. It's unlikely there'd be enough demand to support this server version to act as a forcing function for a patch release. |
Fair enough. we are stuck on 6.3 since this has been broken for a while and would love to be able to use the optimizations done since then. |
Description
What is changing?
The message stream is paused when we're not reading from it, so we do not miss
data
events.Is there new documentation needed for these changes?
What is the motivation for this change?
Release Highlight
Fixed indefinite hang bug for high write load scenarios
When performing large and many write operations, the driver will likely encounter buffering at the socket layer. The logic that waited until buffered writes were complete would mistakenly drop
'data'
(reading from the socket), causing the driver to hang indefinitely or until a socket timeout. Using pausing and resuming mechanisms exposed by Node streams we have eliminated the possibility for data events to go unhandled.Shout out to @hunkydoryrepair for debugging and finding this issue!
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript