Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-3688): make handshake errors retryable #3165
fix(NODE-3688): make handshake errors retryable #3165
Changes from all commits
74330d9
9bc6814
fdbd2a3
9f8ead4
343f6ce
504911e
0397e2d
4522619
e9997f2
39f94cf
f0f21c2
a02e805
87b3906
804299e
8a06a64
52d9cf1
bb3e5ba
14ebf7f
5b28e91
fecb104
e33f2b2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
sorry for missing this the first time around, but after discussing this with the team, this check right now is too broad (e.g., if we get a non-retryable error we shouldn't add the label):
if (needsRetryableWriteLabel(err))
error.ts
and already does all the checks we'd expect, unfortunately it has a small bug in it right now which we'll want to fix to make this work correctly: themaxWireVersion
check happens before theMongoNetworkError
check, so basically we want to combine themaxWireVersion
check via||
with the check onL765
in that file, and change the block toreturn false
(if it already has a label, it doesn't need one)Update: DRIVERS ticket filed here: https://jira.mongodb.org/browse/DRIVERS-2247
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.
This has been updated to use
needsRetryableWriteLabel
and that code has been refactored to not take themaxWireVersion
into account anymore, since the configure fail point error does not automatically add the label in 4.4+ servers. So the code basically just looks to see if the label is there or not and ignores the wire version.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.
Sorry I LGTM-ed but this looks outstanding still
@durran What're your thoughts on point 4? Copying the existing tests and changing the error code seems like it could "just work" 🤞 Maybe we merge this and open a follow up PR for the sake of ease of review, thoughts?