[SERVER-41437] Unify transaction oplog traversal Created: 31/May/19  Updated: 29/Oct/23  Resolved: 09/Aug/19

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

Type: Improvement Priority: Major - P3
Reporter: Pavithra Vetriselvan Assignee: Judah Schvimer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-41163 During initial sync, failing to apply... Closed
depends on SERVER-41788 Add OplogApplication::Mode to options... Closed
Related
related to SERVER-70764 remove unused function getPreviousOpl... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Repl 2019-07-01, Repl 2019-07-15, Repl 2019-07-29, Repl 2019-08-12
Participants:

 Description   

After SERVER-41163, we will have several different commit oplog application paths for transactions.

It's possible that some of these paths (i.e. recovery) were needed before the Oplog Durability project. But, now that we come back up at a consistent snapshot, it's probably unnecessary to commit these operations in the same WUOW.

During initial sync, it is enough to commit each operation using the commit oplog entry timestamp. We don't need to put them back through prepare because we know that the changes have already been committed.

Timestamping during replication recovery is a little trickier since we would probably need to timestamp writes at the commitTimestamp. After SERVER-37180, it would be easy to track the relevant timestamp information in OplogEntry instead of having to thread it through multiple layers in SyncTail.

We should investigate if we actually need to keep the initial sync and recovery code paths separate for commit oplog entry application.



 Comments   
Comment by Githook User [ 11/Oct/19 ]

Author:

{'username': 'judahschvimer', 'email': 'judah.schvimer@10gen.com', 'name': 'Judah Schvimer'}

Message: SERVER-41437 minor transaction_oplog_application.js clean up
SERVER-41437 unify transaction oplog traversal

(cherry picked from commit 6dabe5871fcd280f654e475e7048385b54b1ea64)
(cherry picked from commit f14d9c4c07e69c2109de0af059123060c73cdd77)
Branch: v4.2
https://github.com/mongodb/mongo/commit/20883d237ab0e4ee45c3aa6bc5f00602265402b1

Comment by Githook User [ 09/Aug/19 ]

Author:

{'name': 'Judah Schvimer', 'username': 'judahschvimer', 'email': 'judah@mongodb.com'}

Message: SERVER-41437 unify transaction oplog traversal
Branch: master
https://github.com/mongodb/mongo/commit/f14d9c4c07e69c2109de0af059123060c73cdd77

Comment by Judah Schvimer [ 07/Aug/19 ]

This ticket was originally "Unify commit oplog entry application paths for transactions", but we stopped early. We can file a new ticket to finish out the plan in my notes doc above if this becomes a pain point in the future.

Comment by Githook User [ 01/Jul/19 ]

Author:

{'name': 'Judah Schvimer', 'email': 'judah@mongodb.com', 'username': 'judahschvimer'}

Message: SERVER-41437 minor transaction_oplog_application.js clean up
Branch: master
https://github.com/mongodb/mongo/commit/6dabe5871fcd280f654e475e7048385b54b1ea64

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