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

Remove unnecessary AuthorizationManager::logOp() in OpObserver

    XMLWordPrintableJSON

Details

    • Replication

    Description

      AuthorizationManager::logOp() is registered on all commands in OpObserver, but only drop, dropDatabase and renameCollection are interesting to RoleGraph.

      The code also treats createIndexes on roles collection as an unsupported operation. We should remove these unnecessary AuthorizationManager::logOp() calls.

          if ((cmdName == "collMod" || cmdName == "emptycapped" || cmdName == "createIndexes") &&
              cmdObj.firstElement().str() != rolesCollectionNamespace.coll()) {
              // We don't care about these if they're not on the roles collection.
              return Status::OK();
          }
      ...
          //  No other commands expected.  Warn.
          return Status(ErrorCodes::OplogOperationUnsupported, "Unsupported oplog operation");
      

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: