Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-62781

Include "tid" in oplog entries for commands

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • 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:

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

      Attachments

        Activity

          People

            hugh.tong@mongodb.com Hugh Tong (Inactive)
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: