[SERVER-62395] Use tid field to construct namespace when applying non-txn commands during oplog application Created: 06/Jan/22 Updated: 29/Oct/23 Resolved: 19/Oct/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Janna Golden | Assignee: | Janna Golden |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | auto-reverted | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Server Serverless 2022-08-22, Server Serverless 2022-09-05, Server Serverless 2022-09-19, Server Serverless 2022-10-03, Server Serverless 2022-10-17, Server Serverless 2022-10-31 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||
| Description |
|
Commands are applied in applyCommand_inlock (called here in OplogApplierUtils::applyOplogEntryOrGroupedInsertsCommon). Each command defines its own apply function, and this is where the NamespaceString is constructed today (generally command oplog entries use <dbName>$cmd as the "ns" field, and put the collection name in the "o" field, see the "create" command as an example). In general, we should use the "ns" (to grab the db name), "o" (to grab the collection name), and "tid" fields in the oplog entry in order to construct the NamespaceString or DatabaseName (for commands applied on a db). Some commands' apply functions call into another function, if any of these functions take in a std::string dbName today, let's change the signature of those functions to take in DatabaseName (i.e. the create command). This ticket is to change specifically all of the commands not related to transactions/applyOps listed in kOpsMap (so skip applyOps, commitTransaction, and abortTransaction). Feel free to break this ticket into multiple tickets if you prefer to make changes to individual commands (or smaller chunks at a time).
Add tests to OplogApplierImplTest (in oplog_applier_impl_test.cpp). |
| Comments |
| Comment by Githook User [ 17/Oct/22 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: |
| Comment by xgen-buildbaron-user [ 15/Oct/22 ] |
|
Ticket re-opened due to revert. run_unittests began a consistent failure of build/install/bin/db_repl_test |
| Comment by Githook User [ 15/Oct/22 ] |
|
Author: {'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com'}Message: Revert " This reverts commit 3e16f4386ed3772d9aa01c16057f43d4a90eb133. |
| Comment by Githook User [ 14/Oct/22 ] |
|
Author: {'name': 'Hugh Tong', 'email': 'hugh.tong@mongodb.com', 'username': 'cortrain'}Message: |