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

Attach UnknownTransactionCommitResult errorLabel when commitTransaction fails and the result is unknown

    XMLWordPrintable

    Details

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

      Description

      Similar to SERVER-34256 (where the server started adding to TransientTransactionError error label to transient errors within a transaction) the server should attach the UnknownTransactionCommitResult error label when commitTransaction fails and the result of the transaction is unknown.

      When UnknownTransactionCommitResult is returned it is expected that a client can re-run commitTransaction.

      A non-exhaustive list of errors that should be labelled UnknownTransactionCommitResult are:

      // Retryable writes errors:
      {ok: 0, code: 11600, codeName: "InterruptedAtShutdown"}
      {ok: 0, code: 11602, codeName: "InterruptedDueToStepDown"}
      {ok: 0, code: 10107, codeName: "NotMaster"}
      {ok: 0, code: 13435, codeName: "NotMasterNoSlaveOk"}
      {ok: 0, code: 13436, codeName: "NotMasterOrSecondary"}
      {ok: 0, code: 189, codeName: "PrimarySteppedDown"}
      {ok: 0, code: 91, codeName: "ShutdownInProgress"}
      {ok: 0, code: 7, codeName: "HostNotFound"}
      {ok: 0, code: 6, codeName: "HostUnreachable"}
      {ok: 0, code: 89, codeName: "NetworkTimeout"}
      {ok: 0, code: 9001, codeName: "SocketException"}
       
      // maxTimeMS on commit error:
      {ok: 0, code: 50, codeName: "MaxTimeMSExpired"}
       
      // Any write concern error except UnsatisfiableWriteConcern and UnknownReplWriteConcern, eg:
      {ok:1, writeConcernError: {code: 64, codeName: "WriteConcernFailed", errmsg: "waiting for replication timed out", errInfo: {wtimeout: True}}}
      {ok:1, writeConcernError: {code: 64, codeName: "WriteConcernFailed", errmsg: "multiple errors reported : {...} at shardName1 :: and :: {...} at shardName2"}}
      {ok:1, writeConcernError: {code: 11600, codeName: "InterruptedAtShutdown"}}
      {ok:1, writeConcernError: {code: 11601, codeName: "Interrupted"}}
      {ok:1, writeConcernError: {code: 11602, codeName: "InterruptedDueToStepDown"}}
      {ok:1, writeConcernError: {code: 91, codeName: "ShutdownInProgress"}}
      {ok:1, writeConcernError: {code: 189, codeName: "PrimarySteppedDown"}}
      {ok:1, writeConcernError: {code: 50, codeName: "MaxTimeMSExpired"}}
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: