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

Perform noop write before returning NoSuchTransaction error

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.7
    • Component/s: Replication
    • Labels:
      None

      Description

      If a command returns a NoSuchTransaction error and there was a write concern provided on the command, perform a noop write before waiting for write concern. This ensures that if the command was run with write concern w:majority, and the write concern succeeds, then it is safe to attach the TransientTransactionError label. That is, it is safe for the driver/application to retry the entire transaction, since the node is primary, so the transaction cannot have committed on a newer primary.

      Since secondaries reject all commands with write concern, we will not attempt to perform the noop write on secondaries.

      This ticket must resolve all TODOs for SERVER-38132 and SERVER-38133, since it replaces those two tickets.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: