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

Write commitTransaction oplog entry on primary for large unprepared transactions

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.9
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible
    • Repl 2019-02-25, Repl 2019-03-11

      On commit, after writing oplog entries for buffered operations, a “commitTransaction” oplog entry is written with a new subfield of the command (“o” field) { “prepared” : false } to distinguish from prepared transactions.

      {
          "ts": Timestamp(1538534630, 10),
          "t": NumberLong(1),
          "op": "c",
          "ns": "admin.$cmd",
      
          // The new commitTransaction command, for unprepared transactions.
          "o": { "commitTransaction": 1, "prepared": false },
      
          "lsid": < lsid > ,
          "txnNumber": NumberLong("1"),
      
          // Pointing to the previous oplog entry in the transaction.
          "prevOpTime": { "ts": Timestamp(1538534630, 2), "t": NumberLong(1) }
      }
      

      The IDL format of commitTransaction oplog entry should be updated to include the new field.

            Assignee:
            matthew.russotto@mongodb.com Matthew Russotto
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: