diff options
author | Misha Tyulenev <misha@mongodb.com> | 2016-03-14 17:01:03 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2016-03-15 14:57:10 -0400 |
commit | 53d7b17b462fa0aa8fc1270027153a723b62e2c8 (patch) | |
tree | a07c0a5dd436f91692e2b85f983ac2563feda7de | |
parent | aa8424641411b39c54c18422fa7de04f0ca54ecc (diff) | |
download | mongo-53d7b17b462fa0aa8fc1270027153a723b62e2c8.tar.gz |
SERVER-15133 remove DBClientCursor::initCommand()
-rw-r--r-- | src/mongo/client/dbclientcursor.cpp | 10 | ||||
-rw-r--r-- | src/mongo/client/dbclientcursor.h | 10 | ||||
-rw-r--r-- | src/mongo/client/parallel.cpp | 13 |
3 files changed, 1 insertions, 32 deletions
diff --git a/src/mongo/client/dbclientcursor.cpp b/src/mongo/client/dbclientcursor.cpp index 489f647a2ca..ca06f27aa43 100644 --- a/src/mongo/client/dbclientcursor.cpp +++ b/src/mongo/client/dbclientcursor.cpp @@ -179,16 +179,6 @@ bool DBClientCursor::initLazyFinish(bool& retry) { return !retry; } -bool DBClientCursor::initCommand() { - BSONObj res; - - bool ok = _client->runCommand(nsGetDB(ns), query, res, opts); - replyToQuery(0, batch.m, res); - dataReceived(); - - return ok; -} - void DBClientCursor::requestMore() { verify(cursorId && batch.pos == batch.nReturned); diff --git a/src/mongo/client/dbclientcursor.h b/src/mongo/client/dbclientcursor.h index a085d90dbd9..7363cdb1453 100644 --- a/src/mongo/client/dbclientcursor.h +++ b/src/mongo/client/dbclientcursor.h @@ -195,16 +195,6 @@ public: } /** - * Used mainly to run commands on connections that doesn't support lazy initialization and - * does not support commands through the call interface. - * - * @param cmd The BSON representation of the command to send. - * - * @return true if command was sent successfully - */ - bool initCommand(); - - /** * actually does the query */ bool init(); diff --git a/src/mongo/client/parallel.cpp b/src/mongo/client/parallel.cpp index 23981d811ac..d9abd71ffb1 100644 --- a/src/mongo/client/parallel.cpp +++ b/src/mongo/client/parallel.cpp @@ -620,18 +620,7 @@ void ParallelSortClusteredCursor::startInit(OperationContext* txn) { mdata.retryNext = false; mdata.initialized = true; } else { - bool success = false; - - if (nsGetCollection(ns) == "$cmd") { - /* TODO: remove this when config servers don't use - * SyncClusterConnection anymore. This is needed - * because SyncConn doesn't allow the call() method - * to be used for commands. - */ - success = state->cursor->initCommand(); - } else { - success = state->cursor->init(); - } + bool success = state->cursor->init(); // Without full initialization, throw an exception uassert(15987, |