summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/sharding_connection_hook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/client/sharding_connection_hook.cpp')
-rw-r--r--src/mongo/s/client/sharding_connection_hook.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp
index 80e924e1121..176491f198a 100644
--- a/src/mongo/s/client/sharding_connection_hook.cpp
+++ b/src/mongo/s/client/sharding_connection_hook.cpp
@@ -49,28 +49,6 @@ namespace mongo {
using std::string;
-namespace {
-
-bool initWireVersion(DBClientBase* conn, std::string* errMsg) {
- BSONObj response;
- if (!conn->runCommand("admin", BSON("isMaster" << 1), response)) {
- *errMsg = str::stream() << "Failed to determine wire version "
- << "for internal connection: " << response;
- return false;
- }
-
- if (response.hasField("minWireVersion") && response.hasField("maxWireVersion")) {
- int minWireVersion = response["minWireVersion"].numberInt();
- int maxWireVersion = response["maxWireVersion"].numberInt();
- conn->setWireVersions(minWireVersion, maxWireVersion);
- }
-
- return true;
-}
-
-} // namespace
-
-
ShardingConnectionHook::ShardingConnectionHook(bool shardedConnections)
: _shardedConnections(shardedConnections) {}
@@ -87,18 +65,6 @@ void ShardingConnectionHook::onCreate(DBClientBase* conn) {
result);
}
- // Initialize the wire version of single connections
- if (conn->type() == ConnectionString::MASTER) {
- LOG(2) << "checking wire version of new connection " << conn->toString();
-
- // Initialize the wire protocol version of the connection to find out if we
- // can send write commands to this connection.
- string errMsg;
- if (!initWireVersion(conn, &errMsg)) {
- uasserted(17363, errMsg);
- }
- }
-
if (_shardedConnections) {
// For every DBClient created by mongos, add a hook that will capture the response from
// commands we pass along from the client, so that we can target the correct node when