diff options
author | David Storch <david.storch@10gen.com> | 2015-08-21 11:17:18 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-08-24 09:31:13 -0400 |
commit | dd15f9c211f5bc40b6fa8a7cd44350d3aeb87d89 (patch) | |
tree | c5dd533a814bf498f3aec4a7b52b1c707af5eb11 /src/mongo/rpc/protocol.cpp | |
parent | 9140a197d93251d262e4f241e9d3b371ea8f5c2b (diff) | |
download | mongo-dd15f9c211f5bc40b6fa8a7cd44350d3aeb87d89.tar.gz |
SERVER-18849 only send wire version for find/getMore commands if config server mode is CSRS
A mongod will return a maxWireVersion of 4 to indicate support for the find and
getMore commands. In constrast, mongos will only return maxWireVersion of 4 if
configured with CSRS, as full find/getMore command support is predicated on
config server as a replica set.
Diffstat (limited to 'src/mongo/rpc/protocol.cpp')
-rw-r--r-- | src/mongo/rpc/protocol.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/rpc/protocol.cpp b/src/mongo/rpc/protocol.cpp index fb4683ee4ca..5bff4b05e4f 100644 --- a/src/mongo/rpc/protocol.cpp +++ b/src/mongo/rpc/protocol.cpp @@ -146,8 +146,9 @@ StatusWith<ProtocolSet> parseProtocolSetFromIsMasterReply(const BSONObj& isMaste } bool supportsWireVersionForOpCommandInMongod(int minWireVersion, int maxWireVersion) { - return (minWireVersion <= WireVersion::RELEASE_3_1_5) && - (maxWireVersion >= WireVersion::RELEASE_3_1_5); + // FIND_COMMAND versions support OP_COMMAND (in mongod but not mongos). + return (minWireVersion <= WireVersion::FIND_COMMAND) && + (maxWireVersion >= WireVersion::FIND_COMMAND); } } // namespace rpc |