-
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?
This impacts 3.x
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
- is cloned by
-
NODE-3711 4.x - abortTransaction and commitTransaction should respect RetryableWriteError
- Closed