[SERVER-70899] move logOplogEntries() from OpObserverImpl to TransactionOperations Created: 27/Oct/22  Updated: 29/Oct/23  Resolved: 15/Dec/22

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

Type: Task 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
related to SERVER-71210 move packTransactionStatementsForAppl... Closed
related to SERVER-71671 move definition of hangAfterLoggingAp... Closed
related to SERVER-71054 TransactionParticipant last write opt... Closed
related to SERVER-71069 add ReplOperation method for exportin... Closed
related to SERVER-71655 relax multi-timestamp constraint for ... Closed
related to SERVER-71657 improve const-ness of OpObserver tran... Closed
related to SERVER-71842 simplify logApplyOps (op_observer_imp... Closed
is related to SERVER-70572 support applyOps oplog entry chaining... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-11-14, Execution Team 2022-12-12, Execution Team 2022-11-28, Execution Team 2022-12-26
Participants:

 Description   

This function was introduced to format unprepared multi-document transactions in the OpObserverImpl implementation. It has since been extended to handle prepared transactions and batched writes. As a prerequisite to extending batched writes to span multipl applyOps oplog entries, we should extract this function and add it to the TransactionsOperations for improved testability.

This refactor will also affect packTransactionStatementsForApplyOps.



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

Author:

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

Message: SERVER-70899 OpObserverImpl uses TransactionOperations::logOplogEntries()

The formatting of the applyOps oplog entries is delegated to TransactionOperations
while OpCtx-specific logic related to multi-doc transactions (prepared and unprepared)
and batched writes is handled in the LogApplyOpsFn functions defined in the
respective OpObserverImpl methods.
Branch: master
https://github.com/mongodb/mongo/commit/7ac62bbf3a3bc62acac296c1a758a812038cede2

Comment by Githook User [ 14/Dec/22 ]

Author:

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

Message: SERVER-70899 add TransactionOperations::logOplogEntries()

This function formats and replicates applyOps oplog entries
for multi-document transactions and batched writes.

Replaces logOplogEntries() in op_observer_impl.cpp.
Branch: master
https://github.com/mongodb/mongo/commit/f2673f88311d01940e8889bb2eadd3530636407b

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