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

Retry commitTransaction once in mongo shell

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

      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.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: