diff options
Diffstat (limited to 'src/mongo/s/commands')
-rw-r--r-- | src/mongo/s/commands/cluster_explain.cpp | 3 | ||||
-rw-r--r-- | src/mongo/s/commands/cluster_explain_cmd.cpp | 3 | ||||
-rw-r--r-- | src/mongo/s/commands/cluster_map_reduce_cmd.cpp | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/s/commands/cluster_explain.cpp b/src/mongo/s/commands/cluster_explain.cpp index 3b455954ca9..1498ea9fe80 100644 --- a/src/mongo/s/commands/cluster_explain.cpp +++ b/src/mongo/s/commands/cluster_explain.cpp @@ -29,6 +29,7 @@ #include "mongo/platform/basic.h" #include "mongo/bson/bsonmisc.h" +#include "mongo/db/command_generic_argument.h" #include "mongo/db/commands.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/client/shard_registry.h" @@ -138,7 +139,7 @@ BSONObj ClusterExplain::wrapAsExplain(const BSONObj& cmdObj, ExplainOptions::Ver // Propagate all generic arguments out of the inner command since the shards will only process // them at the top level. for (auto elem : filtered) { - if (CommandHelpers::isGenericArgument(elem.fieldNameStringData())) { + if (isGenericArgument(elem.fieldNameStringData())) { out.append(elem); } } diff --git a/src/mongo/s/commands/cluster_explain_cmd.cpp b/src/mongo/s/commands/cluster_explain_cmd.cpp index 4a8dfc091a6..24254f24054 100644 --- a/src/mongo/s/commands/cluster_explain_cmd.cpp +++ b/src/mongo/s/commands/cluster_explain_cmd.cpp @@ -29,6 +29,7 @@ #include "mongo/platform/basic.h" #include "mongo/client/dbclientinterface.h" +#include "mongo/db/command_generic_argument.h" #include "mongo/db/commands.h" #include "mongo/db/query/explain.h" #include "mongo/s/query/cluster_find.h" @@ -194,7 +195,7 @@ std::unique_ptr<CommandInvocation> ClusterExplainCmd::parse(OperationContext* op // If the argument is in both the inner and outer command, we currently let the // inner version take precedence. const auto name = outerElem.fieldNameStringData(); - if (CommandHelpers::isGenericArgument(name) && !innerObj.hasField(name)) { + if (isGenericArgument(name) && !innerObj.hasField(name)) { bob.append(outerElem); } } diff --git a/src/mongo/s/commands/cluster_map_reduce_cmd.cpp b/src/mongo/s/commands/cluster_map_reduce_cmd.cpp index 6fe1d46770f..0650a073fa0 100644 --- a/src/mongo/s/commands/cluster_map_reduce_cmd.cpp +++ b/src/mongo/s/commands/cluster_map_reduce_cmd.cpp @@ -38,6 +38,7 @@ #include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/client/connpool.h" #include "mongo/db/catalog/document_validation.h" +#include "mongo/db/command_generic_argument.h" #include "mongo/db/commands.h" #include "mongo/db/commands/mr.h" #include "mongo/db/query/collation/collation_spec.h" @@ -93,7 +94,7 @@ BSONObj fixForShards(const BSONObj& orig, b.append(e); } else if (fn == "out" || fn == "finalize" || fn == "writeConcern") { // We don't want to copy these - } else if (!CommandHelpers::isGenericArgument(fn)) { + } else if (!isGenericArgument(fn)) { badShardedField = fn.toString(); return BSONObj(); } |