-
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-3711): retry txn end on retryable write #3047
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
durran
changed the title
fix(NODE-3711): retry txn end on retryable write
fix(NODE-3711): retry txn end on retryable write (3.7)
Nov 18, 2021
durran
changed the title
fix(NODE-3711): retry txn end on retryable write (3.7)
fix(NODE-3711): retry txn end on retryable write
Nov 18, 2021
durran
force-pushed
the
NODE-3711-3.7
branch
from
November 18, 2021 20:33
da29690
to
4a7b555
Compare
dariakp
added
the
Primary Review
In Review with primary reviewer, not yet ready for team's eyes
label
Dec 1, 2021
nbbeeken
approved these changes
Dec 1, 2021
dariakp
added
Team Review
Needs review from team
and removed
Primary Review
In Review with primary reviewer, not yet ready for team's eyes
labels
Dec 1, 2021
dariakp
approved these changes
Dec 1, 2021
This was referenced Oct 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a backport of NODE-3711 to 3.7
Description
The driver was retrying
commitTransaction
andabortTransaction
but previously failing 4 spec tests that were tricking the driver to base retries on these commands on error code. The retryable writes spec defines the specific errors that are retryable, and the transactions spec states these 2 commands must adhere to that specification. The fact that an operation is retryable is stated as:When connected to a MongoDB instance that supports retryable writes (versions 3.6+), the driver MUST treat all errors with the RetryableWriteError label as retryable.
Note that the ticket was scoped to these two commands only, so the full gambit of retryable writes was not touched. There is a ticket to address that in NODE-3769.
What is changing?
This adds a new check for for if a transaction command can be retried,
isRetryableEndTransactionError
, which bases this solely on if the error contains a "RetryableWriteError" and does not look at the error code.Is there new documentation needed for these changes?
No
What is the motivation for this change?
NODE-3711
Double check the following
npm run check:lint
script<type>(NODE-xxxx)<!>: <description>