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

Retry commitTransaction once in mongo shell

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Replication, Shell
    • Labels:
      None

      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

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: