[SERVER-74563] Streamline logical branches in opObserverImpl::onInserts Created: 02/Mar/23  Updated: 29/Oct/23  Resolved: 27/Apr/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-74589 move logic for marking orphan documen... Closed
related to SERVER-75787 remove std::function reference from r... Closed
is related to SERVER-74100 Streamline logical branches in opObse... Backlog
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-04-17, Execution Team 2023-05-01
Participants:

 Description   

The objective of this ticket is to be able to create a MutableOplogEntry in OpObserverImpl::onInserts and pass that to logMutableOplogEntry to route to its eventual destination (batched writes/multi-doc txn/write-through to oplog).



 Comments   
Comment by Benety Goh [ 27/Apr/23 ]

We consolidated the oplog entry formatting code that used to be split between OpObserverImpl and oplog.cpp into one location within OpObserverImpl.

The insert formatting code works on a range of insert operations, which is a little different from the rest of the oplog entry formatting callbacks in OpObserver which work on single operations. As such, we decided to leave the insert formatting logic separate from the rest of the CRUD and DDL operations.

Comment by Githook User [ 26/Apr/23 ]

Author:

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

Message: SERVER-74563 remove unused function repl::logInsertOps()

The implementation has been moved to OpObserverImpl.
Branch: master
https://github.com/mongodb/mongo/commit/6dda218e0ea97be2467098758fcce437e18cb1aa

Comment by Githook User [ 26/Apr/23 ]

Author:

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

Message: SERVER-74563 remove unused function OplogWriter::logInsertOps()
Branch: master
https://github.com/mongodb/mongo/commit/4d541df08dde02eb967c8f2720e1e46beb88ff9c

Comment by Githook User [ 26/Apr/23 ]

Author:

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

Message: SERVER-74563 copy repl::logInsertOps to OpObserverImpl implementation

This consolidates the insert oplog entry logic in op_observer_impl.cpp.
repl::logInsertOps() in oplog.cpp will no longer be used to format insert
oplog entries.
Branch: master
https://github.com/mongodb/mongo/commit/861a15b40720f0bb3b137576185bc1ba4d6eb0a8

Comment by Githook User [ 26/Apr/23 ]

Author:

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

Message: SERVER-74563 OplogWriterMock::getNextOpTimes() returns non-empty vector of OpTimes to support logInsertOps() in tests
Branch: master
https://github.com/mongodb/mongo/commit/e67ab87f4b966f0447280e518f620603d04add97

Comment by Githook User [ 26/Apr/23 ]

Author:

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

Message: SERVER-74563 add logOplogRecords to OplogWriter interface
Branch: master
https://github.com/mongodb/mongo/commit/537030bc588c260280a83fdda6e3c55f9acca9ff

Comment by Githook User [ 26/Apr/23 ]

Author:

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

Message: SERVER-74563 remove unused headers and std imports from oplog.cpp

Last reference to std::deque was removed in commit 6543f0dea026b6ff9ad6f701a8f6ca62f0679613.
Last reference to ""_format() was removed in commit 320b66da2ed0ea95a082560af1ac1fb1800884bb.
Last reference to MultiIndexBlock was removed in commit 0b8ad5785098eb5d7537e8f621aa3aa331284e65.
Branch: master
https://github.com/mongodb/mongo/commit/4052ce367a9a01bb92872e15ca69ffdf4465174c

Comment by Githook User [ 26/Apr/23 ]

Author:

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

Message: SERVER-74563 move fail points addDestinedRecipient and sleepBetweenInsertOpTimeGenerationAndLogOp to op_observer_util
Branch: master
https://github.com/mongodb/mongo/commit/cd29dad92501a77a4f5d36a63dfbbd66e4299ee9

Comment by Githook User [ 26/Apr/23 ]

Author:

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

Message: SERVER-74563 rename repl::_logOpsInner to logOplogRecords() and add to oplog.h interface
Branch: master
https://github.com/mongodb/mongo/commit/5c4ff801ef9f1acb448c4a7c6ac8c0f94934371d

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