[SERVER-67281] provide OpObserver hooks for starting batched writes Created: 14/Jun/22  Updated: 29/Oct/23  Resolved: 29/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.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

Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-06-27, Execution Team 2022-07-11
Participants:

 Description   

The WriteUnitOfWork commits batched writes (multiple CRUD ops to replicate together within a single applyOps oplog entry) through an OpObserver event. However, we start batched writes by instantiating the decorator within the WriteUnitOfWork's constructor. It would be more consistent to extend the OpObserver interface to include methods for starting and aborting batched writes. This would also remove the need for the WriteUnitOfWork class to depend on the BatchedWriterContext.



 Comments   
Comment by Githook User [ 29/Jun/22 ]

Author:

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

Message: SERVER-67281 move BatchedWriteContext logic out of WriteUnitOfWork into OpObserver onBatchedWrite*() handlers
Branch: master
https://github.com/mongodb/mongo/commit/5ac2bc97f4917e7305b3fa257207553e298da932

Comment by Githook User [ 28/Jun/22 ]

Author:

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

Message: SERVER-67281 remove unused logging header from WriteUnitOfWork implementation
Branch: master
https://github.com/mongodb/mongo/commit/953ab41256bf558dc5f15433aa5b904f004f3be4

Comment by Githook User [ 28/Jun/22 ]

Author:

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

Message: SERVER-67281 add OpObserver::onBatchedWriteStart() and onBatchedWriteAbort()
Branch: master
https://github.com/mongodb/mongo/commit/3e27134024d243b03e0d52c2e8e966f5aeb7f84f

Comment by Githook User [ 28/Jun/22 ]

Author:

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

Message: SERVER-67281 add OpObserver::onBatchedWriteStart() and onBatchedWriteAbort()
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/06a5e2683ebc9d3ab5620750ff43b6889c50c383

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