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

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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.4
    • Sprint:
      Repl 2021-02-22

      Description

      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).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lingzhi.deng Lingzhi Deng
              Reporter:
              lingzhi.deng Lingzhi Deng
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: