-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
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
-
0
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).
A few spacial cases:
- startIndexBuild, commitIndexBuild, abortIndexBuild - these should use the UUID in the IndexBuildOplogEntry to grab the Collection object, so we shouldn't need to worry about changing the IndexBuildOplogEntry type
- renameCollection - we should use the “tid” field along with the “to” and “from” fields rather than grabbing the "ns" and "o" fields (as it does today).
- importCollection - we'll have to change applyImportCollection in the enterprise repo as well.
Add tests to OplogApplierImplTest (in oplog_applier_impl_test.cpp).
- has to be done before
-
SERVER-57867 Introduce sys-perf testing for PM-2334
- Backlog
-
SERVER-69115 Enable writing to the change collection on the secondaries.
- Closed
- is depended on by
-
SERVER-69726 Run multitenancy tests on replica sets
- Closed