[SERVER-39432] Write commitTransaction oplog entry on primary for large unprepared transactions Created: 07/Feb/19  Updated: 29/Oct/23  Resolved: 27/Feb/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.1.9

Type: Task Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Repl 2019-02-25, Repl 2019-03-11
Participants:

 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.



 Comments   
Comment by Githook User [ 27/Feb/19 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-39432 Write commitTransaction oplog entry on primary for large unprepared transactions
Branch: master
https://github.com/mongodb/mongo/commit/a51f74677d0ff290a031abdf5f70017f10a004a5

Generated at Thu Feb 08 04:52:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.