diff options
Diffstat (limited to 'src/mongo/db/commands')
63 files changed, 136 insertions, 136 deletions
diff --git a/src/mongo/db/commands/apply_ops_cmd.cpp b/src/mongo/db/commands/apply_ops_cmd.cpp index be1184edc62..9b142037601 100644 --- a/src/mongo/db/commands/apply_ops_cmd.cpp +++ b/src/mongo/db/commands/apply_ops_cmd.cpp @@ -87,7 +87,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { validateApplyOpsCommand(cmdObj); diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp index 438da755c30..58493790818 100644 --- a/src/mongo/db/commands/authentication_commands.cpp +++ b/src/mongo/db/commands/authentication_commands.cpp @@ -115,7 +115,7 @@ public: std::vector<Privilege>* out) {} // No auth required bool run(OperationContext* opCtx, const string&, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { nonce64 n = getNextNonce(); @@ -152,7 +152,7 @@ void CmdAuthenticate::redactForLogging(mutablebson::Document* cmdObj) { bool CmdAuthenticate::run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { if (!serverGlobalParams.quiet.load()) { @@ -375,7 +375,7 @@ public: CmdLogout() : Command("logout") {} bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { AuthorizationSession* authSession = AuthorizationSession::get(Client::getCurrent()); diff --git a/src/mongo/db/commands/authentication_commands.h b/src/mongo/db/commands/authentication_commands.h index e49c214091c..f6b0c66e147 100644 --- a/src/mongo/db/commands/authentication_commands.h +++ b/src/mongo/db/commands/authentication_commands.h @@ -57,7 +57,7 @@ public: CmdAuthenticate() : Command("authenticate") {} bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result); diff --git a/src/mongo/db/commands/clone.cpp b/src/mongo/db/commands/clone.cpp index 68674aead43..14585aedcd4 100644 --- a/src/mongo/db/commands/clone.cpp +++ b/src/mongo/db/commands/clone.cpp @@ -89,7 +89,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { boost::optional<DisableDocumentValidation> maybeDisableValidation; diff --git a/src/mongo/db/commands/clone_collection.cpp b/src/mongo/db/commands/clone_collection.cpp index f8aeb131026..c1ca464ea4c 100644 --- a/src/mongo/db/commands/clone_collection.cpp +++ b/src/mongo/db/commands/clone_collection.cpp @@ -105,7 +105,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { boost::optional<DisableDocumentValidation> maybeDisableValidation; diff --git a/src/mongo/db/commands/collection_to_capped.cpp b/src/mongo/db/commands/collection_to_capped.cpp index 62fab6dfe69..b749b2b1b23 100644 --- a/src/mongo/db/commands/collection_to_capped.cpp +++ b/src/mongo/db/commands/collection_to_capped.cpp @@ -86,7 +86,7 @@ public: } bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { const auto fromElt = jsobj["cloneCollectionAsCapped"]; @@ -170,7 +170,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss(parseNsCollectionRequired(dbname, jsobj)); diff --git a/src/mongo/db/commands/compact.cpp b/src/mongo/db/commands/compact.cpp index bd408337cc5..e7c914ef0c4 100644 --- a/src/mongo/db/commands/compact.cpp +++ b/src/mongo/db/commands/compact.cpp @@ -88,7 +88,7 @@ public: virtual bool run(OperationContext* opCtx, const string& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { NamespaceString nss = parseNsCollectionRequired(db, cmdObj); diff --git a/src/mongo/db/commands/conn_pool_stats.cpp b/src/mongo/db/commands/conn_pool_stats.cpp index c3700b839bf..88a74cdbd30 100644 --- a/src/mongo/db/commands/conn_pool_stats.cpp +++ b/src/mongo/db/commands/conn_pool_stats.cpp @@ -71,7 +71,7 @@ public: bool run(OperationContext* opCtx, const std::string&, - mongo::BSONObj&, + const mongo::BSONObj&, std::string&, mongo::BSONObjBuilder& result) override { executor::ConnectionPoolStats stats{}; diff --git a/src/mongo/db/commands/conn_pool_sync.cpp b/src/mongo/db/commands/conn_pool_sync.cpp index 602f6e8421d..32bdda9bffa 100644 --- a/src/mongo/db/commands/conn_pool_sync.cpp +++ b/src/mongo/db/commands/conn_pool_sync.cpp @@ -56,7 +56,7 @@ public: virtual bool run(OperationContext* opCtx, const std::string&, - mongo::BSONObj&, + const mongo::BSONObj&, std::string&, mongo::BSONObjBuilder& result) { shardConnectionPool.flush(); diff --git a/src/mongo/db/commands/connection_status.cpp b/src/mongo/db/commands/connection_status.cpp index c21d1427414..10cd52c4815 100644 --- a/src/mongo/db/commands/connection_status.cpp +++ b/src/mongo/db/commands/connection_status.cpp @@ -57,7 +57,7 @@ public: bool run(OperationContext* opCtx, const string&, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { AuthorizationSession* authSession = AuthorizationSession::get(Client::getCurrent()); diff --git a/src/mongo/db/commands/copydb.cpp b/src/mongo/db/commands/copydb.cpp index 88ef6540e02..e0ab332ac04 100644 --- a/src/mongo/db/commands/copydb.cpp +++ b/src/mongo/db/commands/copydb.cpp @@ -117,7 +117,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { boost::optional<DisableDocumentValidation> maybeDisableValidation; diff --git a/src/mongo/db/commands/copydb_start_commands.cpp b/src/mongo/db/commands/copydb_start_commands.cpp index e028431cf71..24ebc9c695a 100644 --- a/src/mongo/db/commands/copydb_start_commands.cpp +++ b/src/mongo/db/commands/copydb_start_commands.cpp @@ -98,7 +98,7 @@ public: virtual bool run(OperationContext* opCtx, const string&, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { string fromhost = cmdObj.getStringField("fromhost"); @@ -171,7 +171,7 @@ public: virtual bool run(OperationContext* opCtx, const string&, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const auto fromdbElt = cmdObj["fromdb"]; diff --git a/src/mongo/db/commands/count_cmd.cpp b/src/mongo/db/commands/count_cmd.cpp index 2af91e01876..0003b2bf806 100644 --- a/src/mongo/db/commands/count_cmd.cpp +++ b/src/mongo/db/commands/count_cmd.cpp @@ -166,7 +166,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const bool isExplain = false; diff --git a/src/mongo/db/commands/cpuload.cpp b/src/mongo/db/commands/cpuload.cpp index 3ad635a57d7..f8ac54313e6 100644 --- a/src/mongo/db/commands/cpuload.cpp +++ b/src/mongo/db/commands/cpuload.cpp @@ -60,7 +60,7 @@ public: std::vector<Privilege>* out) {} // No auth required virtual bool run(OperationContext* txn, const string& badns, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { double cpuFactor = 1; diff --git a/src/mongo/db/commands/cpuprofile.cpp b/src/mongo/db/commands/cpuprofile.cpp index 8f9c16901fe..c5ec73204a9 100644 --- a/src/mongo/db/commands/cpuprofile.cpp +++ b/src/mongo/db/commands/cpuprofile.cpp @@ -105,7 +105,7 @@ public: virtual bool run(OperationContext* opCtx, std::string const& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result); @@ -121,7 +121,7 @@ public: virtual bool run(OperationContext* opCtx, std::string const& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result); @@ -133,7 +133,7 @@ char const* const CpuProfilerStopCommand::commandName = "_cpuProfilerStop"; bool CpuProfilerStartCommand::run(OperationContext* opCtx, std::string const& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { // The DB lock here is just so we have IX on the global lock in order to prevent shutdown @@ -150,7 +150,7 @@ bool CpuProfilerStartCommand::run(OperationContext* opCtx, bool CpuProfilerStopCommand::run(OperationContext* opCtx, std::string const& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { // The DB lock here is just so we have IX on the global lock in order to prevent shutdown diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp index db71d3bebf5..77feecc13a0 100644 --- a/src/mongo/db/commands/create_indexes.cpp +++ b/src/mongo/db/commands/create_indexes.cpp @@ -227,7 +227,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString ns(parseNsCollectionRequired(dbname, cmdObj)); diff --git a/src/mongo/db/commands/current_op.cpp b/src/mongo/db/commands/current_op.cpp index 3a86aaabf31..623610d3e66 100644 --- a/src/mongo/db/commands/current_op.cpp +++ b/src/mongo/db/commands/current_op.cpp @@ -87,7 +87,7 @@ public: bool run(OperationContext* opCtx, const std::string& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) final { const bool includeAll = cmdObj["$all"].trueValue(); diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index f41d6a2ae2b..e1383becee1 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -126,7 +126,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { bool force = cmdObj.hasField("force") && cmdObj["force"].trueValue(); @@ -175,7 +175,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { // disallow dropping the config database @@ -243,7 +243,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { BSONElement e = cmdObj.firstElement(); @@ -346,7 +346,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { BSONElement firstElement = cmdObj.firstElement(); @@ -428,7 +428,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const char* deprecationWarning = @@ -485,7 +485,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nsToDrop = parseNsCollectionRequired(dbname, cmdObj); @@ -536,7 +536,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString ns(parseNsCollectionRequired(dbname, cmdObj)); @@ -677,7 +677,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss(parseNs(dbname, jsobj)); @@ -856,7 +856,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { Timer timer; @@ -999,7 +999,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss(parseNsCollectionRequired(dbname, jsobj)); @@ -1047,7 +1047,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss(parseNsCollectionRequired(dbname, jsobj)); @@ -1082,7 +1082,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { int scale = 1; @@ -1166,7 +1166,7 @@ public: std::vector<Privilege>* out) {} // No auth required virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { result << "you" << opCtx->getClient()->clientAddress(true /*includePort*/); @@ -1192,7 +1192,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { result << "options" << QueryOption_AllSupported; diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp index 598fe1aad7c..5aaf0d382ca 100644 --- a/src/mongo/db/commands/dbhash.cpp +++ b/src/mongo/db/commands/dbhash.cpp @@ -80,7 +80,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { Timer timer; diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp index 6c2bef4012a..c1958e34f55 100644 --- a/src/mongo/db/commands/distinct.cpp +++ b/src/mongo/db/commands/distinct.cpp @@ -166,7 +166,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss(parseNsCollectionRequired(dbname, cmdObj)); diff --git a/src/mongo/db/commands/driverHelpers.cpp b/src/mongo/db/commands/driverHelpers.cpp index 994eb54605c..ae169abd8b6 100644 --- a/src/mongo/db/commands/driverHelpers.cpp +++ b/src/mongo/db/commands/driverHelpers.cpp @@ -75,7 +75,7 @@ public: std::vector<Privilege>* out) {} // No auth required virtual bool run(OperationContext* opCtx, const string&, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { if (cmdObj.firstElement().type() != jstOID) { diff --git a/src/mongo/db/commands/drop_indexes.cpp b/src/mongo/db/commands/drop_indexes.cpp index 0a78963ad1f..b8c6e5442cb 100644 --- a/src/mongo/db/commands/drop_indexes.cpp +++ b/src/mongo/db/commands/drop_indexes.cpp @@ -86,7 +86,7 @@ public: CmdDropIndexes() : Command("dropIndexes", "deleteIndexes") {} bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss = parseNsCollectionRequired(dbname, jsobj); @@ -117,7 +117,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { DBDirectClient db(opCtx); diff --git a/src/mongo/db/commands/eval.cpp b/src/mongo/db/commands/eval.cpp index 3a11e45e11f..dbebb016e16 100644 --- a/src/mongo/db/commands/eval.cpp +++ b/src/mongo/db/commands/eval.cpp @@ -176,7 +176,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { // Note: 'eval' is not allowed to touch sharded namespaces, but we can't check the diff --git a/src/mongo/db/commands/explain_cmd.cpp b/src/mongo/db/commands/explain_cmd.cpp index b62fe416ac7..e55da5b2974 100644 --- a/src/mongo/db/commands/explain_cmd.cpp +++ b/src/mongo/db/commands/explain_cmd.cpp @@ -122,7 +122,7 @@ public: virtual bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { auto verbosity = ExplainOptions::parseCmdBSON(cmdObj); diff --git a/src/mongo/db/commands/fail_point_cmd.cpp b/src/mongo/db/commands/fail_point_cmd.cpp index ce8f1367f58..17d447550e5 100644 --- a/src/mongo/db/commands/fail_point_cmd.cpp +++ b/src/mongo/db/commands/fail_point_cmd.cpp @@ -92,7 +92,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const string failPointName(cmdObj.firstElement().str()); diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp index 5ec268571e5..01d5d70b584 100644 --- a/src/mongo/db/commands/find_and_modify.cpp +++ b/src/mongo/db/commands/find_and_modify.cpp @@ -337,7 +337,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbName, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) override { // findAndModify command is not replicated directly. diff --git a/src/mongo/db/commands/find_cmd.cpp b/src/mongo/db/commands/find_cmd.cpp index dc6640989f9..8c7759471ce 100644 --- a/src/mongo/db/commands/find_cmd.cpp +++ b/src/mongo/db/commands/find_cmd.cpp @@ -228,7 +228,7 @@ public: */ bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) override { const NamespaceString nss(parseNsOrUUID(opCtx, dbname, cmdObj)); diff --git a/src/mongo/db/commands/fsync.cpp b/src/mongo/db/commands/fsync.cpp index 1a9b7628503..5359963d381 100644 --- a/src/mongo/db/commands/fsync.cpp +++ b/src/mongo/db/commands/fsync.cpp @@ -119,7 +119,7 @@ public: } virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { if (opCtx->lockState()->isLocked()) { @@ -292,7 +292,7 @@ public: bool run(OperationContext* opCtx, const std::string& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) override { log() << "command: unlock requested"; diff --git a/src/mongo/db/commands/generic.cpp b/src/mongo/db/commands/generic.cpp index 0a54dc74bbb..d520f59e2c6 100644 --- a/src/mongo/db/commands/generic.cpp +++ b/src/mongo/db/commands/generic.cpp @@ -91,7 +91,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, std::string& errmsg, BSONObjBuilder& result) { VersionInfoInterface::instance().appendBuildInfo(&result); @@ -120,7 +120,7 @@ public: std::vector<Privilege>* out) {} // No auth required virtual bool run(OperationContext* opCtx, const string& badns, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { // IMPORTANT: Don't put anything in here that might lock db - including authentication @@ -145,7 +145,7 @@ public: std::vector<Privilege>* out) {} // No auth required virtual bool run(OperationContext* opCtx, const string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { if (getGlobalScriptEngine()) { @@ -187,7 +187,7 @@ public: } bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { ProcessInfo p; @@ -234,7 +234,7 @@ public: } virtual bool run(OperationContext* opCtx, const string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { bool didRotate = rotateLogs(serverGlobalParams.logRenameOnRotate); @@ -265,7 +265,7 @@ public: std::vector<Privilege>* out) {} // No auth required virtual bool run(OperationContext* opCtx, const string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { // sort the commands before building the result BSON @@ -363,7 +363,7 @@ public: CmdForceError() : Command("forceerror") {} bool run(OperationContext* opCtx, const string& dbnamne, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { LastError::get(cc()).setLastError(10038, "forced error"); @@ -397,7 +397,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { BSONElement val = cmdObj.firstElement(); @@ -468,7 +468,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { std::string logName; @@ -520,7 +520,7 @@ public: } virtual bool run(OperationContext* opCtx, const string&, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { result.append("argv", serverGlobalParams.argvArray); diff --git a/src/mongo/db/commands/geo_near_cmd.cpp b/src/mongo/db/commands/geo_near_cmd.cpp index 65cf9a857dc..ce4f54a5790 100644 --- a/src/mongo/db/commands/geo_near_cmd.cpp +++ b/src/mongo/db/commands/geo_near_cmd.cpp @@ -100,7 +100,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { if (!cmdObj["start"].eoo()) { diff --git a/src/mongo/db/commands/get_last_error.cpp b/src/mongo/db/commands/get_last_error.cpp index e153de58188..7196c363ec3 100644 --- a/src/mongo/db/commands/get_last_error.cpp +++ b/src/mongo/db/commands/get_last_error.cpp @@ -72,7 +72,7 @@ public: CmdResetError() : Command("resetError", "reseterror") {} bool run(OperationContext* opCtx, const string& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { LastError::get(opCtx->getClient()).reset(); @@ -105,7 +105,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { // @@ -313,7 +313,7 @@ public: CmdGetPrevError() : Command("getPrevError", "getpreverror") {} bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { LastError* le = &LastError::get(opCtx->getClient()); diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp index de15131f3fd..59c2848313c 100644 --- a/src/mongo/db/commands/getmore_cmd.cpp +++ b/src/mongo/db/commands/getmore_cmd.cpp @@ -148,7 +148,7 @@ public: bool runParsed(OperationContext* opCtx, const NamespaceString& origNss, const GetMoreRequest& request, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { @@ -443,7 +443,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) override { // Counted as a getMore, not as a command. diff --git a/src/mongo/db/commands/group_cmd.cpp b/src/mongo/db/commands/group_cmd.cpp index ac17916ef31..45cd9c999ce 100644 --- a/src/mongo/db/commands/group_cmd.cpp +++ b/src/mongo/db/commands/group_cmd.cpp @@ -150,7 +150,7 @@ private: virtual bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { RARELY { diff --git a/src/mongo/db/commands/hashcmd.cpp b/src/mongo/db/commands/hashcmd.cpp index b47b2352650..a540cd771f0 100644 --- a/src/mongo/db/commands/hashcmd.cpp +++ b/src/mongo/db/commands/hashcmd.cpp @@ -81,7 +81,7 @@ public: **/ bool run(OperationContext* opCtx, const string& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { result.appendAs(cmdObj.firstElement(), "key"); diff --git a/src/mongo/db/commands/haystack.cpp b/src/mongo/db/commands/haystack.cpp index 77270437ff7..b2b7f9977b6 100644 --- a/src/mongo/db/commands/haystack.cpp +++ b/src/mongo/db/commands/haystack.cpp @@ -97,7 +97,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss = parseNsCollectionRequired(dbname, cmdObj); diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp index 101294e4dde..42e9419622c 100644 --- a/src/mongo/db/commands/index_filter_commands.cpp +++ b/src/mongo/db/commands/index_filter_commands.cpp @@ -117,7 +117,7 @@ IndexFilterCommand::IndexFilterCommand(const string& name, const string& helpTex bool IndexFilterCommand::run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss(parseNsCollectionRequired(dbname, cmdObj)); @@ -161,7 +161,7 @@ ListFilters::ListFilters() Status ListFilters::runIndexFilterCommand(OperationContext* opCtx, const string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob) { // This is a read lock. The query settings is owned by the collection. AutoGetCollectionForReadCommand ctx(opCtx, NamespaceString(ns)); @@ -229,7 +229,7 @@ ClearFilters::ClearFilters() Status ClearFilters::runIndexFilterCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob) { // This is a read lock. The query settings is owned by the collection. AutoGetCollectionForReadCommand ctx(opCtx, NamespaceString(ns)); @@ -330,7 +330,7 @@ SetFilter::SetFilter() Status SetFilter::runIndexFilterCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob) { // This is a read lock. The query settings is owned by the collection. const NamespaceString nss(ns); diff --git a/src/mongo/db/commands/index_filter_commands.h b/src/mongo/db/commands/index_filter_commands.h index 9cedd30f765..27c81dbc6ba 100644 --- a/src/mongo/db/commands/index_filter_commands.h +++ b/src/mongo/db/commands/index_filter_commands.h @@ -65,7 +65,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result); @@ -93,7 +93,7 @@ public: */ virtual Status runIndexFilterCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob) = 0; private: @@ -112,7 +112,7 @@ public: virtual Status runIndexFilterCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob); /** @@ -134,7 +134,7 @@ public: virtual Status runIndexFilterCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob); /** @@ -168,7 +168,7 @@ public: virtual Status runIndexFilterCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob); /** diff --git a/src/mongo/db/commands/isself.cpp b/src/mongo/db/commands/isself.cpp index bb1a023c7b5..014fb89ee2d 100644 --- a/src/mongo/db/commands/isself.cpp +++ b/src/mongo/db/commands/isself.cpp @@ -56,7 +56,7 @@ public: std::vector<Privilege>* out) {} // No auth required bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { result.append("id", repl::instanceId); diff --git a/src/mongo/db/commands/kill_op.cpp b/src/mongo/db/commands/kill_op.cpp index 6a6d4603443..6edd8b8b4a8 100644 --- a/src/mongo/db/commands/kill_op.cpp +++ b/src/mongo/db/commands/kill_op.cpp @@ -130,7 +130,7 @@ public: bool run(OperationContext* opCtx, const std::string& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) final { long long opId = parseOpId(cmdObj); diff --git a/src/mongo/db/commands/killcursors_common.cpp b/src/mongo/db/commands/killcursors_common.cpp index b20aeb3f734..eaa9ec51baf 100644 --- a/src/mongo/db/commands/killcursors_common.cpp +++ b/src/mongo/db/commands/killcursors_common.cpp @@ -65,7 +65,7 @@ Status KillCursorsCmdBase::checkAuthForCommand(Client* client, bool KillCursorsCmdBase::run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { auto statusWithRequest = KillCursorsRequest::parseFromBSON(dbname, cmdObj); diff --git a/src/mongo/db/commands/killcursors_common.h b/src/mongo/db/commands/killcursors_common.h index 8d4bcf07c75..0944abd0468 100644 --- a/src/mongo/db/commands/killcursors_common.h +++ b/src/mongo/db/commands/killcursors_common.h @@ -72,7 +72,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) final; diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp index e9038a46cfd..b667dfcb092 100644 --- a/src/mongo/db/commands/list_collections.cpp +++ b/src/mongo/db/commands/list_collections.cpp @@ -220,7 +220,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { unique_ptr<MatchExpression> matcher; diff --git a/src/mongo/db/commands/list_databases.cpp b/src/mongo/db/commands/list_databases.cpp index d71d9ab3abb..4b96d386577 100644 --- a/src/mongo/db/commands/list_databases.cpp +++ b/src/mongo/db/commands/list_databases.cpp @@ -85,7 +85,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { // Parse the filter. diff --git a/src/mongo/db/commands/list_indexes.cpp b/src/mongo/db/commands/list_indexes.cpp index 6d58c8c2b47..0e639d07108 100644 --- a/src/mongo/db/commands/list_indexes.cpp +++ b/src/mongo/db/commands/list_indexes.cpp @@ -118,7 +118,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString ns(parseNsOrUUID(opCtx, dbname, cmdObj)); diff --git a/src/mongo/db/commands/lock_info.cpp b/src/mongo/db/commands/lock_info.cpp index 9318f734c9f..5a3c2dd5dab 100644 --- a/src/mongo/db/commands/lock_info.cpp +++ b/src/mongo/db/commands/lock_info.cpp @@ -81,7 +81,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& jsobj, + const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { std::map<LockerId, BSONObj> lockToClientMap; diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index e4463ad7c1a..3cfb1ec4341 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -1375,7 +1375,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmd, + const BSONObj& cmd, string& errmsg, BSONObjBuilder& result) { Timer t; @@ -1710,7 +1710,7 @@ public: } bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer) { diff --git a/src/mongo/db/commands/oplog_note.cpp b/src/mongo/db/commands/oplog_note.cpp index 9a5760d616a..371057a68fa 100644 --- a/src/mongo/db/commands/oplog_note.cpp +++ b/src/mongo/db/commands/oplog_note.cpp @@ -115,7 +115,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auto replCoord = repl::ReplicationCoordinator::get(opCtx); diff --git a/src/mongo/db/commands/parallel_collection_scan.cpp b/src/mongo/db/commands/parallel_collection_scan.cpp index 41471f656aa..a81c9e3a4c5 100644 --- a/src/mongo/db/commands/parallel_collection_scan.cpp +++ b/src/mongo/db/commands/parallel_collection_scan.cpp @@ -87,7 +87,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString ns(parseNsCollectionRequired(dbname, cmdObj)); diff --git a/src/mongo/db/commands/parameters.cpp b/src/mongo/db/commands/parameters.cpp index 785375c514f..ab794c8bf0e 100644 --- a/src/mongo/db/commands/parameters.cpp +++ b/src/mongo/db/commands/parameters.cpp @@ -90,7 +90,7 @@ public: } bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { bool all = *cmdObj.firstElement().valuestrsafe() == '*'; @@ -138,7 +138,7 @@ public: } bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { int numSet = 0; diff --git a/src/mongo/db/commands/pipeline_command.cpp b/src/mongo/db/commands/pipeline_command.cpp index 9f21d3825db..79a2e76270d 100644 --- a/src/mongo/db/commands/pipeline_command.cpp +++ b/src/mongo/db/commands/pipeline_command.cpp @@ -83,7 +83,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) override { return appendCommandStatus(result, diff --git a/src/mongo/db/commands/plan_cache_commands.cpp b/src/mongo/db/commands/plan_cache_commands.cpp index f194d17129e..c7ebdb034a1 100644 --- a/src/mongo/db/commands/plan_cache_commands.cpp +++ b/src/mongo/db/commands/plan_cache_commands.cpp @@ -112,7 +112,7 @@ PlanCacheCommand::PlanCacheCommand(const string& name, bool PlanCacheCommand::run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss(parseNsCollectionRequired(dbname, cmdObj)); @@ -223,7 +223,7 @@ PlanCacheListQueryShapes::PlanCacheListQueryShapes() Status PlanCacheListQueryShapes::runPlanCacheCommand(OperationContext* opCtx, const string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob) { // This is a read lock. The query cache is owned by the collection. AutoGetCollectionForReadCommand ctx(opCtx, NamespaceString(ns)); @@ -275,7 +275,7 @@ PlanCacheClear::PlanCacheClear() Status PlanCacheClear::runPlanCacheCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob) { // This is a read lock. The query cache is owned by the collection. AutoGetCollectionForReadCommand ctx(opCtx, NamespaceString(ns)); @@ -352,7 +352,7 @@ PlanCacheListPlans::PlanCacheListPlans() Status PlanCacheListPlans::runPlanCacheCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob) { AutoGetCollectionForReadCommand ctx(opCtx, NamespaceString(ns)); diff --git a/src/mongo/db/commands/plan_cache_commands.h b/src/mongo/db/commands/plan_cache_commands.h index 7b3da100782..8057aaaf95d 100644 --- a/src/mongo/db/commands/plan_cache_commands.h +++ b/src/mongo/db/commands/plan_cache_commands.h @@ -59,7 +59,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result); @@ -87,7 +87,7 @@ public: */ virtual Status runPlanCacheCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob) = 0; /** @@ -113,7 +113,7 @@ public: PlanCacheListQueryShapes(); virtual Status runPlanCacheCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob); /** @@ -139,7 +139,7 @@ public: PlanCacheClear(); virtual Status runPlanCacheCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob); /** @@ -168,7 +168,7 @@ public: PlanCacheListPlans(); virtual Status runPlanCacheCommand(OperationContext* opCtx, const std::string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, BSONObjBuilder* bob); /** diff --git a/src/mongo/db/commands/rename_collection_cmd.cpp b/src/mongo/db/commands/rename_collection_cmd.cpp index 8a2afb4da64..9c4c027328c 100644 --- a/src/mongo/db/commands/rename_collection_cmd.cpp +++ b/src/mongo/db/commands/rename_collection_cmd.cpp @@ -87,7 +87,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const auto sourceNsElt = cmdObj[getName()]; diff --git a/src/mongo/db/commands/repair_cursor.cpp b/src/mongo/db/commands/repair_cursor.cpp index 031370f4316..5d644f78341 100644 --- a/src/mongo/db/commands/repair_cursor.cpp +++ b/src/mongo/db/commands/repair_cursor.cpp @@ -69,7 +69,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { NamespaceString ns(parseNs(dbname, cmdObj)); diff --git a/src/mongo/db/commands/server_status.cpp b/src/mongo/db/commands/server_status.cpp index 212498d178b..9edf5c43d16 100644 --- a/src/mongo/db/commands/server_status.cpp +++ b/src/mongo/db/commands/server_status.cpp @@ -87,7 +87,7 @@ public: } bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { _runCalled = true; diff --git a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp index 10234b925ba..7f01ef9ca5a 100644 --- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp +++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp @@ -83,7 +83,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { const auto version = uassertStatusOK( diff --git a/src/mongo/db/commands/snapshot_management.cpp b/src/mongo/db/commands/snapshot_management.cpp index 05782177b9e..20b406b34fc 100644 --- a/src/mongo/db/commands/snapshot_management.cpp +++ b/src/mongo/db/commands/snapshot_management.cpp @@ -66,7 +66,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { auto snapshotManager = @@ -115,7 +115,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { auto snapshotManager = diff --git a/src/mongo/db/commands/test_commands.cpp b/src/mongo/db/commands/test_commands.cpp index 10016c71f0f..17cba2ee54a 100644 --- a/src/mongo/db/commands/test_commands.cpp +++ b/src/mongo/db/commands/test_commands.cpp @@ -77,7 +77,7 @@ public: } virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss(parseNsCollectionRequired(dbname, cmdObj)); @@ -151,7 +151,7 @@ public: CmdSleep() : Command("sleep") {} bool run(OperationContext* opCtx, const string& ns, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { log() << "test only command sleep invoked"; @@ -214,7 +214,7 @@ public: std::vector<Privilege>* out) {} virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString fullNs = parseNsCollectionRequired(dbname, cmdObj); @@ -291,7 +291,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss = parseNsCollectionRequired(dbname, cmdObj); diff --git a/src/mongo/db/commands/top_command.cpp b/src/mongo/db/commands/top_command.cpp index 8f306df9838..2b9c2e54671 100644 --- a/src/mongo/db/commands/top_command.cpp +++ b/src/mongo/db/commands/top_command.cpp @@ -67,7 +67,7 @@ public: } virtual bool run(OperationContext* opCtx, const std::string& db, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) { { diff --git a/src/mongo/db/commands/touch.cpp b/src/mongo/db/commands/touch.cpp index 18c99460650..dbb6a2221af 100644 --- a/src/mongo/db/commands/touch.cpp +++ b/src/mongo/db/commands/touch.cpp @@ -84,7 +84,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { const NamespaceString nss = parseNsCollectionRequired(dbname, cmdObj); diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp index 8f147bc3baa..3126a71551d 100644 --- a/src/mongo/db/commands/user_management_commands.cpp +++ b/src/mongo/db/commands/user_management_commands.cpp @@ -618,7 +618,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auth::CreateOrUpdateUserArgs args; @@ -764,7 +764,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auth::CreateOrUpdateUserArgs args; @@ -881,7 +881,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { UserName userName; @@ -949,7 +949,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { Status status = auth::parseAndValidateDropAllUsersFromDatabaseCommand(cmdObj, dbname); @@ -1006,7 +1006,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { std::string userNameString; @@ -1080,7 +1080,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { std::string userNameString; @@ -1158,7 +1158,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auth::UsersInfoArgs args; @@ -1270,7 +1270,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auth::CreateOrUpdateRoleArgs args; @@ -1383,7 +1383,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auth::CreateOrUpdateRoleArgs args; @@ -1481,7 +1481,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { @@ -1589,7 +1589,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { RoleName roleName; @@ -1699,7 +1699,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { std::string roleNameString; @@ -1790,7 +1790,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { std::string roleNameString; @@ -1880,7 +1880,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { RoleName roleName; @@ -2034,7 +2034,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { Status status = auth::parseDropAllRolesFromDatabaseCommand(cmdObj, dbname); @@ -2177,7 +2177,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auth::RolesInfoArgs args; @@ -2258,7 +2258,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { AuthorizationManager* authzManager = getGlobalAuthorizationManager(); @@ -2296,7 +2296,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { AuthorizationManager* authzManager = getGlobalAuthorizationManager(); @@ -2673,7 +2673,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auth::MergeAuthzCollectionsArgs args; @@ -2914,7 +2914,7 @@ public: virtual bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { auth::AuthSchemaUpgradeArgs parsedArgs; diff --git a/src/mongo/db/commands/validate.cpp b/src/mongo/db/commands/validate.cpp index 11a0806fbf9..6b3e76286a7 100644 --- a/src/mongo/db/commands/validate.cpp +++ b/src/mongo/db/commands/validate.cpp @@ -77,7 +77,7 @@ public: bool run(OperationContext* opCtx, const string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) { if (MONGO_FAIL_POINT(validateCmdCollectionNotValid)) { diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp index a3ecd02b36a..f9e17234607 100644 --- a/src/mongo/db/commands/write_commands/write_commands.cpp +++ b/src/mongo/db/commands/write_commands/write_commands.cpp @@ -209,7 +209,7 @@ public: bool run(OperationContext* opCtx, const std::string& dbname, - BSONObj& cmdObj, + const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) final { try { |