4.x - abortTransaction and commitTransaction should respect RetryableWriteError

XMLWordPrintableJSON

    • 2
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • 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

              Assignee:
              Durran Jordan
              Reporter:
              Neal Beeken
              Daria Pardue
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: