Remove unnecessary AuthorizationManager::logOp() in OpObserver

XMLWordPrintableJSON

    • Replication
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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");
      

            Assignee:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: