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

Unlock RSTL after calling setLastOpToSystemLastOpTime in PrepareTransactionCmd

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.4
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Repl 2020-02-10
    • 20

      After SERVER-39364, ReplClientInfo::setLastOpToSystemLastOpTime acquires a global IS lock and implicitly the RSTL lock in MODE IX. But when setLastOpToSystemLastOpTime is called on a retry of a prepared transaction, it breaks the contract that prepared transactions should not hold RSTL locks.

      Updated: We dont have to call setLastOpToSystemLastOpTime, we can simply set client lastOp to max(prepareOpTime, lastAppliedOpTime)

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

              Created:
              Updated:
              Resolved: