diff options
Diffstat (limited to 'src/mongo/db/commands/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/commands/dbcommands.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index 791d851c376..15851760bc5 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -64,7 +64,6 @@ #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/dbhelpers.h" -#include "mongo/db/diag_log.h" #include "mongo/db/exec/working_set_common.h" #include "mongo/db/index/index_access_method.h" #include "mongo/db/index/index_descriptor.h" @@ -391,64 +390,6 @@ public: } cmdProfile; -class CmdDiagLogging : public BasicCommand { -public: - virtual bool slaveOk() const { - return true; - } - CmdDiagLogging() : BasicCommand("diagLogging") {} - bool adminOnly() const { - return true; - } - - void help(stringstream& h) const { - h << "http://dochub.mongodb.org/core/" - "monitoring#MonitoringandDiagnostics-DatabaseRecord%2FReplay%28diagLoggingcommand%29"; - } - - - virtual bool supportsWriteConcern(const BSONObj& cmd) const override { - return false; - } - - virtual void addRequiredPrivileges(const std::string& dbname, - const BSONObj& cmdObj, - std::vector<Privilege>* out) { - ActionSet actions; - actions.addAction(ActionType::diagLogging); - out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); - } - - bool run(OperationContext* opCtx, - const string& dbname, - const BSONObj& cmdObj, - BSONObjBuilder& result) { - const char* deprecationWarning = - "CMD diagLogging is deprecated and will be removed in a future release"; - warning() << deprecationWarning << startupWarningsLog; - - // This doesn't look like it requires exclusive DB lock, because it uses its own diag - // locking, but originally the lock was set to be WRITE, so preserving the behaviour. - Lock::DBLock dbXLock(opCtx, dbname, MODE_X); - - // TODO (Kal): OldClientContext legacy, needs to be removed - { - CurOp::get(opCtx)->ensureStarted(); - stdx::lock_guard<Client> lk(*opCtx->getClient()); - CurOp::get(opCtx)->setNS_inlock(dbname); - } - - int was = _diaglog.setLevel(cmdObj.firstElement().numberInt()); - _diaglog.flush(); - if (!serverGlobalParams.quiet.load()) { - LOG(0) << "CMD: diagLogging set to " << _diaglog.getLevel() << " from: " << was; - } - result.append("was", was); - result.append("note", deprecationWarning); - return true; - } -} cmddiaglogging; - /* drop collection */ class CmdDrop : public ErrmsgCommandDeprecated { public: |