-
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-4475): make interrupted message more specific #3437
Conversation
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.
From tech chat - let's try to add tests that
- confirm a change stream resumes if it encounters a resumable error with
interrupted
in the error message - confirm that a change stream does not resume if it encounters an error with
operation was interrupted
as the message
Also - @durran want to file a follow up ticket to investigate removing the two special cases here?
https://jira.mongodb.org/browse/NODE-4717 is created. |
Description
Fixes change stream retryability on 4.4 servers and lower when performing a failover.
What is changing?
This is the "quick and dirty" fix that just avoids pushing a
null
to the readable cursor stream before callingdestroy
on the stream when the error contains the message "interrupted at shutdown".Existing spec tests cover the more specific error - see: https://github.com/mongodb/node-mongodb-native/blob/main/test/spec/retryable-writes/legacy/insertOne-serverErrors.yml#L468
Note: see #3438 for what a start of a refactor away from checking for this error message and creating separate streams for the change stream cursor and the others would look like. However it seems the "operation was interrupted" message affects change streams as well so I'll leave it as draft for now.
Is there new documentation needed for these changes?
None
What is the motivation for this change?
NODE-4475
Double check the following
npm run check:lint
script<type>(NODE-xxxx)<!>: <description>