Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3711

4.x - abortTransaction and commitTransaction should respect RetryableWriteError

    • 2
    • Not Needed

      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

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: