Include "tid" in oplog entries for commands

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Server Serverless 2022-06-13, Server Serverless 2022-06-27, Server Serverless 2022-07-11, Server Serverless 2022-07-25
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:

      We can again add tests to OpObserverTest, though we probably don't need to add a test case for every command.

            Assignee:
            Hugh Tong (Inactive)
            Reporter:
            Janna Golden (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: