[SERVER-77484] migrate OperationContext decorations to OplogDeleteEntryArgs for delete operations Created: 25/May/23  Updated: 29/Oct/23  Resolved: 01/Jun/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-77554 defer oplog reservation in collection... Closed
related to SERVER-80423 Make the preImage document always ava... Closed
is related to SERVER-76271 Remove OpObserverShardingImpl Depende... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-05-29, Execution Team 2023-06-12
Participants:

 Description   

When we are replicating delete operations on a collection, we make a pair of calls to the OpObserver interface to notify listeners of the beginning (aboutToDelete) and end (onDelete) of the delete operation. OpObserver implementations sometimes (using FreeMonOpObserver as an example) have to stash some state in aboutToDelete()* that will be picked up in onDelete(). Typically this is accomplished by attaching the temporary state to the OperationContext as a decorator.

This ticket explores an alternative to the OperationContext decorations by making the OplogDeleteEntryArgs a decorable type and having the OpObservers stash the temporary state in the OplogDeleteEntryArgs struct instead.



 Comments   
Comment by Githook User [ 01/Jun/23 ]

Author:

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

Message: SERVER-77484 move decorations for OpObserver::aboutToDelete() and onDelete() from OperationContext to OplogDeleteEntryArgs
Branch: master
https://github.com/mongodb/mongo/commit/b32042b0dc2f06a56356eb6a6864394b4af46069

Comment by Githook User [ 01/Jun/23 ]

Author:

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

Message: SERVER-77484 make OplogDeleteEntryArgs decorable and pass it to aboutToDelete
Branch: master
https://github.com/mongodb/mongo/commit/abfa3298c9fefafa9fea550d5983f88a435179e3

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