Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Server Serverless 2022-06-13, Server Serverless 2022-06-27, Server Serverless 2022-07-11, Server Serverless 2022-07-25
Description
Change the following functions on OpObserver to take in DatabaseName rather than a string for dbName:
- onDropDatabase
- onApplyOps
Set the "tid" field in the oplog entry for each of the follow commands using the tenantId on the NamespaceString or DatabaseName object passed in (i.e. OpObserverImpl::onStartIndexBuild).
- onCreateIndex
- onStartIndexBuild
- onCommitIndexBuild
- onAbortIndexBuild
- onInternalOpMessage
- onCollMod
- onDropCollection
- onDropIndex
- onEmptyCapped
- onImportCollection
- preRenameCollection
- postRenameCollection
- onRenameCollection
- onDropDatabase
- onApplyOps
Be sure not to include the tenantID in the "ns" field in any oplog entries (i.e. like here in onCreateIndex). There are some commands that log namespaces in fields other than "ns" as well, be sure not to include the tenantID in these either:
Special cases:
- onDropCollection
- Don't include the tenantID in the collection name logged in the "o" field
- preRenameCollection
- Don't include the tenantID in the from and to namespaces
We can again add tests to OpObserverTest, though we probably don't need to add a test case for every command.
Attachments
Issue Links
- related to
-
SERVER-71797 Move definition of MutableOplogEntry::setTid to cpp
-
- Closed
-