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

Write commitTransaction oplog entry on primary for large unprepared transactions

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.9
    • None
    • Replication
    • None
    • Fully Compatible
    • Repl 2019-02-25, Repl 2019-03-11

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: