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

Revisit how the mongo shell decides whether it should retry a command or not

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • Server Tooling & Methods
    • v4.0
    • 5

      The mongo shell currently bases its decision on whether it should retry a command or not on the command request having a "txnNumber" argument. Since the "find" and "getMore" command requests inside of a read-only or read/write transaction will also contain a "txnNumber" argument, we'll need to set a more explicit state on the mongo shell's session to indicate that the request it is about to perform should be retried.

      let numRetries =
          (cmdObj.hasOwnProperty("txnNumber") && !jsTest.options().skipRetryOnNetworkError)
          ? 1
          : 0;
      

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: