summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.h
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2018-04-02 17:01:35 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2018-04-02 20:04:36 -0400
commita16f90edd5339d3f58bec24e2a1639c0b2fd938e (patch)
tree1142d5c3bc277ca44b407dd28fa04e8303b8867f /src/mongo/db/commands.h
parentc872bdd8d24a7beb9df42cbe227e99d6738ba71e (diff)
downloadmongo-a16f90edd5339d3f58bec24e2a1639c0b2fd938e.tar.gz
SERVER-34179 refactor isGenericArgument
Remove the static tables floating around at namespace scope. break CommandHelpers::isGenericArgument into command_generic_argument library so it doesn't have to be inline. Some callers depend on it but would have a circularity if they actually added db/commands to their LIBDEPS.
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r--src/mongo/db/commands.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h
index 0284c852f27..cc69458f5ad 100644
--- a/src/mongo/db/commands.h
+++ b/src/mongo/db/commands.h
@@ -115,38 +115,6 @@ struct CommandHelpers {
static BSONObj appendMajorityWriteConcern(const BSONObj& cmdObj);
/**
- * Returns true if the provided argument is one that is handled by the command processing layer
- * and should generally be ignored by individual command implementations. In particular,
- * commands that fail on unrecognized arguments must not fail for any of these.
- */
- static bool isGenericArgument(StringData arg) {
- // Not including "help" since we don't pass help requests through to the command parser.
- // If that changes, it should be added. When you add to this list, consider whether you
- // should also change the filterCommandRequestForPassthrough() function.
- return arg == "$audit" || //
- arg == "$client" || //
- arg == "$configServerState" || //
- arg == "$db" || //
- arg == "allowImplicitCollectionCreation" || //
- arg == "$oplogQueryData" || //
- arg == "$queryOptions" || //
- arg == "$readPreference" || //
- arg == "$replData" || //
- arg == "$clusterTime" || //
- arg == "maxTimeMS" || //
- arg == "readConcern" || //
- arg == "databaseVersion" || //
- arg == "shardVersion" || //
- arg == "tracking_info" || //
- arg == "writeConcern" || //
- arg == "lsid" || //
- arg == "txnNumber" || //
- arg == "autocommit" || //
- arg == "stmtId" || //
- false; // These comments tell clang-format to keep this line-oriented.
- }
-
- /**
* Rewrites cmdObj into a format safe to blindly forward to shards.
*
* This performs 2 transformations: