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

No need to wait for writeConcern on aborting a multi-document transaction

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v4.4
    • Repl 2021-02-22

      If a transaction aborts due to reasons other than an explicit abortTransaction command (e.g. writeConflict errors), we could still hit this which would call setLastOpToSystemLastOpTime and waitForWriteConcern unnecessarily.

      There is also a weird behavior where if the same connection is used outside of transaction, abortTransction would also wait for writeConcern for the lastOp set by the same connection in previous writes done outside of the transaction (see this test). This is because wasGlobalLockTakenForWrite would always be true when aborting a transaction (either through abortTransction command or due to transaction errors).

            Assignee:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: