-
Notifications
You must be signed in to change notification settings - Fork 244
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
DRIVERS-2695 Add a case of CSOT not enabled for the retryable writes. #1466
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.
Looks good!
handleError(secondError); | ||
throw secondError; | ||
} | ||
break |
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 doesn't account for NoWritesPerformed or error code 20. Is it possible to avoid duplicating the call to executeCommand and other logic here? Perhaps:
if ((timeoutMS == null && retrying) || (timeoutMS != null && isExpired(timeoutMS))) {
throw previousError;
}
retrying = True;
@@ -519,23 +520,15 @@ The above rules are implemented in the following pseudo-code: | |||
if (timeoutMS == null) { |
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.
I have not merged the conditions to keep the reference code straightforward with the comments.
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.
LGTM!
Please complete the following before merging:
Make sure there are generated JSON files from the YAML test files.Test changes in at least one language driver.Test these changes against all server versions and topologies (including standalone, replica set, sharded clusters, and serverless).Driver changes are not needed.