[SERVER-78733] TransactionParticipant generates applyOps entry information for unprepared transactions rather than delegating to OpObserverImpl Created: 06/Jul/23  Updated: 29/Oct/23  Resolved: 18/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
is related to SERVER-78310 move change stream pre-image logic ou... Closed
is related to SERVER-78400 improve OnDeleteOutputsTest handling ... Closed
is related to SERVER-78401 re-order change streams collection wr... Closed
is related to SERVER-78675 TransactionParticipant generates appl... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution NAMR Team 2023-07-10, Execution NAMR Team 2023-07-24
Participants:

 Description   

OpObserverImpl::onUnpreparedTransactionCommit() currently [generates the applyOps oplog entry information||https://github.com/mongodb/mongo/blob/f9a49ec48ad035ca2f6701f5f458aef57dd70438/src/mongo/db/op_observer/op_observer_impl.cpp#L1760] internally for writing the unprepared applyOps entries to the oplog and pass to the change streams pre-image helper. We also reserve the oplog slots within this function.

Doing both of these operations within the OpObserverImpl method makes it inconvenient for us to extract the change streams pre-image logic into a separate OpObserver implementation in SERVER-78310. We should consider generating the applyOps info at the callsite in TransactionParticipant and pass it into the OpObserver interface.



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

Author:

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

Message: SERVER-78733 TransactionParticipant generates applyOps entry information for unprepared transactions rather than delegating to OpObserverImpl

This commit also moves the oplog reservation logic, which is used for generating
the applyOps entry information, out of OpObserverImpl into TransactionParticipant.
Branch: master
https://github.com/mongodb/mongo/commit/9fa00b33c0997dfc59825bb41325e9718f03b88b

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