diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2020-08-24 17:16:37 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-25 20:12:50 +0000 |
commit | 152ea482d58e610e12539cec0be3c4f03e30a213 (patch) | |
tree | 30b8040784d50980376099dab7e36cb10bca0253 /src/mongo/db/command_generic_argument.cpp | |
parent | e08eba28ab9ad4d54adb95e8517c9d43276e5336 (diff) | |
download | mongo-152ea482d58e610e12539cec0be3c4f03e30a213.tar.gz |
Revert "SERVER-49858 Don't forward API params from drop/dropDatabase to config servers"
This reverts commit f4ed96b5a788003322a2dc36b46063475a0b36ca.
For SERVER-50375 we must forward API parameters from mongos commands to
shard commands, so commit f4ed96b5 was, in retrospect, a step in the
wrong direction.
Diffstat (limited to 'src/mongo/db/command_generic_argument.cpp')
-rw-r--r-- | src/mongo/db/command_generic_argument.cpp | 78 |
1 files changed, 36 insertions, 42 deletions
diff --git a/src/mongo/db/command_generic_argument.cpp b/src/mongo/db/command_generic_argument.cpp index 4f4c9f34816..86e6f6c0196 100644 --- a/src/mongo/db/command_generic_argument.cpp +++ b/src/mongo/db/command_generic_argument.cpp @@ -44,7 +44,6 @@ namespace { struct SpecialArgRecord { StringData name; bool isGeneric; - bool isApiParameter; bool stripFromRequest; bool stripFromReply; }; @@ -55,43 +54,42 @@ struct SpecialArgRecord { // clang-format off static constexpr std::array<SpecialArgRecord, 34> specials{{ // /-isGeneric - // | /-isApiParameter - // | | /-stripFromRequest - // | | | /-stripFromReply - {"apiVersion"_sd, 1, 1, 0, 0}, - {"apiStrict"_sd, 1, 1, 0, 0}, - {"apiDeprecationErrors"_sd, 1, 1, 0, 0}, - {"$audit"_sd, 1, 0, 1, 0}, - {"$client"_sd, 1, 0, 1, 0}, - {"$configServerState"_sd, 1, 0, 1, 1}, - {"$db"_sd, 1, 0, 1, 0}, - {"allowImplicitCollectionCreation"_sd, 1, 0, 1, 0}, - {"$oplogQueryData"_sd, 1, 0, 1, 1}, - {"$queryOptions"_sd, 1, 0, 0, 0}, - {"$readPreference"_sd, 1, 0, 1, 0}, - {"$replData"_sd, 1, 0, 1, 1}, - {"$clusterTime"_sd, 1, 0, 1, 1}, - {"maxTimeMS"_sd, 1, 0, 0, 0}, - {"readConcern"_sd, 1, 0, 0, 0}, - {"databaseVersion"_sd, 1, 0, 1, 0}, - {"shardVersion"_sd, 1, 0, 1, 0}, - {"tracking_info"_sd, 1, 0, 1, 0}, - {"writeConcern"_sd, 1, 0, 0, 0}, - {"lsid"_sd, 1, 0, 0, 0}, - {"clientOperationKey"_sd, 1, 0, 0, 0}, - {"txnNumber"_sd, 1, 0, 0, 0}, - {"autocommit"_sd, 1, 0, 0, 0}, - {"coordinator"_sd, 1, 0, 0, 0}, - {"startTransaction"_sd, 1, 0, 0, 0}, - {"stmtId"_sd, 1, 0, 0, 0}, - {"$gleStats"_sd, 0, 0, 0, 1}, - {"operationTime"_sd, 0, 0, 0, 1}, - {"lastCommittedOpTime"_sd, 0, 0, 0, 1}, - {"readOnly"_sd, 0, 0, 0, 1}, - {"comment"_sd, 1, 0, 0, 0}, - {"maxTimeMSOpOnly"_sd, 1, 0, 0, 0}, - {"$configTime"_sd, 1, 0, 1, 1}, - {"$topologyTime"_sd, 1, 0, 1, 1}}}; + // | /-stripFromRequest + // | | /-stripFromReply + {"apiVersion"_sd, 1, 0, 0}, + {"apiStrict"_sd, 1, 0, 0}, + {"apiDeprecationErrors"_sd, 1, 0, 0}, + {"$audit"_sd, 1, 1, 0}, + {"$client"_sd, 1, 1, 0}, + {"$configServerState"_sd, 1, 1, 1}, + {"$db"_sd, 1, 1, 0}, + {"allowImplicitCollectionCreation"_sd, 1, 1, 0}, + {"$oplogQueryData"_sd, 1, 1, 1}, + {"$queryOptions"_sd, 1, 0, 0}, + {"$readPreference"_sd, 1, 1, 0}, + {"$replData"_sd, 1, 1, 1}, + {"$clusterTime"_sd, 1, 1, 1}, + {"maxTimeMS"_sd, 1, 0, 0}, + {"readConcern"_sd, 1, 0, 0}, + {"databaseVersion"_sd, 1, 1, 0}, + {"shardVersion"_sd, 1, 1, 0}, + {"tracking_info"_sd, 1, 1, 0}, + {"writeConcern"_sd, 1, 0, 0}, + {"lsid"_sd, 1, 0, 0}, + {"clientOperationKey"_sd, 1, 0, 0}, + {"txnNumber"_sd, 1, 0, 0}, + {"autocommit"_sd, 1, 0, 0}, + {"coordinator"_sd, 1, 0, 0}, + {"startTransaction"_sd, 1, 0, 0}, + {"stmtId"_sd, 1, 0, 0}, + {"$gleStats"_sd, 0, 0, 1}, + {"operationTime"_sd, 0, 0, 1}, + {"lastCommittedOpTime"_sd, 0, 0, 1}, + {"readOnly"_sd, 0, 0, 1}, + {"comment"_sd, 1, 0, 0}, + {"maxTimeMSOpOnly"_sd, 1, 0, 0}, + {"$configTime"_sd, 1, 1, 1}, + {"$topologyTime"_sd, 1, 1, 1}}}; // clang-format on template <bool SpecialArgRecord::*pmo> @@ -114,10 +112,6 @@ bool isGenericArgument(StringData arg) { return filteredSpecialsContains<&SpecialArgRecord::isGeneric>(arg); } -bool isApiParameter(StringData arg) { - return filteredSpecialsContains<&SpecialArgRecord::isApiParameter>(arg); -} - bool isRequestStripArgument(StringData arg) { return filteredSpecialsContains<&SpecialArgRecord::stripFromRequest>(arg); } |