-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: None
What problem are you facing?
The driver does not retry commitTransaction nor abortTransaction when the error code is not retryable but RetryableWriteError label is present.
From the spec:
abortTransaction is a retryable write command. Drivers MUST retry once after abortTransaction fails with a retryable error according to the Retryable Writes Specification, regardless of whether retryWrites is set on the MongoClient or not.
commitTransaction is a retryable write command. Drivers MUST retry once after commitTransaction fails with a retryable error according to the Retryable Writes Specification, regardless of whether retryWrites is set on the MongoClient or not.
What driver and relevant dependency versions are you using?
4.x driver, I believe this impacts 3.x as well.
Steps to reproduce?
Run these spec tests:
- abortTransaction only retries once with RetryableWriteError from server
- abortTransaction does not retry without RetryableWriteError label
- commitTransaction does not retry error without RetryableWriteError label
- commitTransaction retries once with RetryableWriteError from server
- clones
-
NODE-3683 3.x - abortTransaction and commitTransaction should respect RetryableWriteError
- Closed