[SERVER-53509] Create an oplog chain and update config.transactions for retryable writes Created: 23/Dec/20  Updated: 29/Oct/23  Resolved: 11/Mar/21

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

Type: Task Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: pm-1791_milestone-H
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-53319 Fetching retryable writes from before... Closed
is depended on by SERVER-53510 Handle preImage and postImage for ret... Closed
Problem/Incident
Related
is related to SERVER-53946 Resume batching from the last noop en... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2021-03-08, Repl 2021-03-22
Participants:
Linked BF Score: 178

 Description   

As part of writing noop oplog entries on the recipient, use TransactionParticipant (and config.transactions) itself to cache the OpTime of the last noop oplog entry for each session to create an oplog chain for retryable writes and update config.transactions.

The noop oplog entry should contain "fromMigrate: true" and contain the original oplog entry in the "o2" field so that the SessionUpdateTracker on secondaries recognizes the noop oplog entry as a retryable write oplog entry and updates its config.transactions.



 Comments   
Comment by Githook User [ 11/Mar/21 ]

Author:

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

Message: SERVER-53509 Create an oplog chain and update config.transactions for retryable writes
Branch: master
https://github.com/mongodb/mongo/commit/9234a98e641c4fe88bd37b5e39f6523e7167b61c

Comment by Matthew Russotto [ 01/Mar/21 ]

I believe 'fromMigrate' here is copypasta and should be 'fromTenantMigration' (with a UUID)

Edit: nope, it's intentional. Oplog entry will contain both.

Comment by Githook User [ 26/Feb/21 ]

Author:

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

Message: SERVER-53573 Remove _opTimeMapping and tests making sure we chain no-ops correctly. We will handle
chaining no-ops properly in SERVER-53509 and SERVER-53510.
Branch: master
https://github.com/mongodb/mongo/commit/9b5abca8dcb53f165a8df60a4faaad1586e1be04

Comment by Jason Chan [ 14/Jan/21 ]

Currently in the design for SERVER-52723, when traversing the oplog to calculate the resume oplog application optime, we always assume that the 'o' field of noop log entries contain the original oplog entry information.

Generated at Thu Feb 08 05:31:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.