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

Wait for specified write concern whenever commitTransaction returns a NoSuchTransaction error

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.7, 4.1.6
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2018-10-22, Repl 2018-11-05, Repl 2018-11-19
    • 11

      If a transaction commits locally against a primary, but that primary goes down without replicating the commit, then if the commitTransaction command is retried against the new primary it will error with NoSuchTransaction. Generally a NoSuchTransaction error in this case indicates that the transaction either aborted or rolled back, and thus it would be safe to retry the entire transaction over. If, however, the writeConcern times out in this case then its possible that the original primary could be re-elected without rolling back the txn commit, and thus the transaction could wind up surviving after all.

            Assignee:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: