Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-601

Drivers should use majority write concern when retrying commitTransaction

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • None

    Description

      Relevant changes were added to the commitTransaction section:

      When commitTransaction is retried, either by the driver's internal retry-once logic or explicitly by the user calling commitTransaction again, drivers MUST apply w: majority to the write concern of the commitTransaction command. If the transaction is using a writeConcern that is not the server default (i.e. specified via TransactionOptions during the startTransaction call or otherwise inherited), any other write concern options (e.g. wtimeout) MUST be left as-is when applying w: majority. Finally, if the modified write concern does not include a wtimeout value, drivers MUST also apply wtimeout: 10000 to the write concern in order to avoid waiting forever (or until a socket timeout) if the majority write concern cannot be satisfied. See Majority write concern is used when retrying commitTransaction.

      Note: The transaction spec tests have also been updated. Please ensure your driver is synced to https://github.com/mongodb/specifications/commit/ba1b071fa8b63454fb421bec824c454c92fc5e83 (or newer).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jmikola@mongodb.com Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: