Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40574

Retry commitTransaction once in mongo shell

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication, Shell
    • None
    • Replication

    Description

      The Driver Transactions Specification says (paraphrasing):

      The driver will automatically retry the commitTransaction once after a retryable error.

      The driver MUST add the "UnknownTransactionCommitResult" error label when commitTransaction fails with a server selection error, network error, retryable writes error, or write concern failed / timeout. If an exception with this label is thrown, an application can safely call commitTransaction again.

      See the spec for full details of which errors are retryable.

      Let's make the shell's commitTransaction helper match this section of the drivers spec. DBAs may use transactions in the shell for critical tasks. For the sake of both reliability and consistency, the shell should provide them with the same retry logic drivers do.

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: