summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclient.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-06-27 16:34:23 -0400
committerMathias Stearn <mathias@10gen.com>2017-07-13 16:53:13 -0400
commit10d31e1e3b4f32f842489e2a2de66a547e550b5a (patch)
tree9e61023e26af63704476d1e5782f54fa4d402f9a /src/mongo/client/dbclient.cpp
parent704d2dc2a533e6297a6e77e23fb6afbf574e9572 (diff)
downloadmongo-10d31e1e3b4f32f842489e2a2de66a547e550b5a.tar.gz
SERVER-29731 upconvertRequest now uses document sequences where appropriate
In addition to improving test coverage for document sequences, this also improves performance of insert commands sent over OP_QUERY since they will no longer copy the objects during upconversion.
Diffstat (limited to 'src/mongo/client/dbclient.cpp')
-rw-r--r--src/mongo/client/dbclient.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/client/dbclient.cpp b/src/mongo/client/dbclient.cpp
index 5ffffe9f4ce..23bc549c3ec 100644
--- a/src/mongo/client/dbclient.cpp
+++ b/src/mongo/client/dbclient.cpp
@@ -230,8 +230,7 @@ std::tuple<bool, DBClientWithCommands*> DBClientWithCommands::runCommandWithTarg
// TODO: This will be downconverted immediately if the underlying
// requestBuilder is a legacyRequest builder. Not sure what the best
// way to get around that is without breaking the abstraction.
- auto result = runCommandWithTarget(
- OpMsgRequest::fromDBAndBody(dbname, rpc::upconvertRequest(std::move(cmd), options)));
+ auto result = runCommandWithTarget(rpc::upconvertRequest(dbname, std::move(cmd), options));
info = result.first->getCommandReply().getOwned();
return std::make_tuple(isOk(info), result.second);