[SERVER-71655] relax multi-timestamp constraint for muti-doc transactions outside logOplogEntries Created: 28/Nov/22  Updated: 29/Oct/23  Resolved: 09/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-70899 move logOplogEntries() from OpObserve... Closed
is related to SERVER-48771 Enforce constraints on "multi-timesta... Closed
is related to SERVER-71488 include multi-doc prepare info in Tra... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-12-12
Participants:

 Description   

The logOplogEntries() function (within the OpObserverImpl implementation) formats applyOps oplog entries for multi-doc transactions and batched writes. In order to write out a chain of applyOps oplog entries and to write to the images collection while creating the oplog entries, it has to relax the multi-timestamp constraint on the RecoveryUnit. It would be beneficial in terms of separating the applyOps formatting logic from storage engine related settings to be able to update the RecoveryUnit prior to calling logOplogEntries().

This supports the work in SERVER-70899 where the TransactionOperations would be sole focused on formatting the applyOps entries without any explicit interaction with the OperationContext or RecoveryUnit.



 Comments   
Comment by Githook User [ 08/Dec/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-71655 OpObserverImpl relaxes multi-timestamp constraint for multi-doc transactions outside logOplogEntries()

The information for relaxing the multi-timestamp constraint is available before calling
logOplogEntries() and this logic does not need to part of the applyOps formatting loop.
Branch: master
https://github.com/mongodb/mongo/commit/e5ca3d956bf20effd512f8eb0654f88f0e156a4f

Comment by Githook User [ 08/Dec/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-71655 move lock state invariants from logOplogEntries() to callers

This allows logOplogEntries() to focus on the formatting logic. Checking
the lock state is something that can be done before we format the applyOps
oplog entries.
Branch: master
https://github.com/mongodb/mongo/commit/4ea67148b604e355398a6355f7e348da12c677d9

Comment by Githook User [ 08/Dec/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-71655 TransactionOperations::getApplyOpsInfo() returns number of operations with needs retry image
Branch: master
https://github.com/mongodb/mongo/commit/58b05fa0237c709dd39e663cc668722d4039161d

Generated at Thu Feb 08 06:19:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.