[SERVER-78675] TransactionParticipant generates applyOps entry information for prepared transactions rather than delegating to OpObserverImpl Created: 05/Jul/23  Updated: 29/Oct/23  Resolved: 06/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.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
related to SERVER-78733 TransactionParticipant generates appl... Closed
is related to SERVER-69749 move packOperationsIntoApplyOps() fro... Closed
is related to SERVER-78310 move change stream pre-image logic ou... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution NAMR Team 2023-07-10
Participants:

 Description   

OpObserverImpl::preTransactionPrepare() currently generates the applyOps entry information using the provided oplog slots from TransactionParticipant. This applyOps info is returned from the OpObserver interface for TransactionParticipant's own processing. We can move this call to TransactionOperations::getApplyOpsInfo() to the TransactionParticipant and simplify the OpObserver interface by eliminating the need for the OpObserver method to return a result.



 Comments   
Comment by Githook User [ 06/Jul/23 ]

Author:

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

Message: SERVER-78675 TransactionParticipant generates applyOps entry information for prepared transactions rather than delegating to OpObserverImpl
Branch: master
https://github.com/mongodb/mongo/commit/f9a49ec48ad035ca2f6701f5f458aef57dd70438

Comment by Githook User [ 06/Jul/23 ]

Author:

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

Message: SERVER-78675 move getMaxNumberOfTransactionOperationsInSingleOplogEntry() and getMaxSizeOfTransactionOperationsInSingleOplogEntryBytes() from OpObserverImpl to TransactionParticipant
Branch: master
https://github.com/mongodb/mongo/commit/f5fb74d9ae76bce6e07399f8e4f9bdb1d1278ac8

Comment by Benety Goh [ 05/Jul/23 ]

This change supports SERVER-78310. Previously, it was not convenient to do the applyOps oplog entry processing in the TransactionParticipant because a lot of the applyOps logic was internal to the OpObserverImpl implementation. In SERVER-69749, we extracted this applyOps processing logic and made it part of the TransactionOperations class. This made it possible to reuse this logic within TransactionParticipant.

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