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

Implicit transaction aborts should still wait for write concern for non-transient errors

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL
    • Repl 2022-03-07

      SERVER-54534 made it so that implicit transaction aborts don't wait for write concern (FWIW, we never waited for write concerns for explicit abortTransaction command). This means that if a transaction is implicitly aborted (e.g. due to WriteConflict / DuplicateKey errors), it will not wait for the data the transaction observed to be majority committed before returning.

      For implicit transaction aborts, we will want to wait for write concern for non-transient transaction errors like DuplicateKey so that a subsequent majority read (outside of transaction) is guaranteed to the conflicting write (in the absence of primary failovers).

      For transient errors, we don't have to wait for write concern as the transaction is retryable. But we may still want to wait for write conflict errors so that transactions with snapshot readConcern are guaranteed to read from an updated all_durable on retries.

      So this effectively reverts SERVER-54534.

            Assignee:
            m.maher@mongodb.com Moustafa Maher
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: