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

XMLWordPrintableJSON

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

      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:
            Moustafa Maher
            Reporter:
            Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: