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

Split-prepare transactions are aborted before reserving abort oplog entry

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 7.1.0-rc0, 7.0.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.0
    • Repl 2023-05-15
    • 135

      Primary aborts the split-prepared transactions before it reserves the abort oplog entry. This is a bug as it violates the assumption noted in the comment.

      This bug would enable a sequence like the following - Let's say we have Txn1 and Txn2 that write to the same set of documents:
      1. Txn1 is split and prepared on a node when the node was a secondary
      2. The node steps up as a primary
      3. The node aborts Txn1's split prepared transaction
      4. Now, the node is able to prepare Txn2 with prepareOptime T1 since Txn1 is effectively aborted
      5. The node reserves and writes abort oplog entry for Txn1 with optime T2

      In this case, secondaries would see prepare of Txn2 before abort of Txn1, resulting in prepare conflicts when applying Txn2.

            Assignee:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: