summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclient_base.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-07-25 17:33:21 -0400
committerMathias Stearn <mathias@10gen.com>2018-07-30 14:13:08 -0400
commita5f3bf878d5059215fbc5a5a371aaf2d8a85e8b9 (patch)
tree86baac1bd319bbe02ca31c2404d0b631ff5a25ad /src/mongo/client/dbclient_base.cpp
parentcca8ad6cf6f47e86158a8636b6a07743bd115fcc (diff)
downloadmongo-a5f3bf878d5059215fbc5a5a371aaf2d8a85e8b9.tar.gz
SERVER-33135 Remove metadata accessors from command reply APIs
Now that OP_COMMAND is dead, all remaining implementations return the same BSONObj for data and metadata.
Diffstat (limited to 'src/mongo/client/dbclient_base.cpp')
-rw-r--r--src/mongo/client/dbclient_base.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/client/dbclient_base.cpp b/src/mongo/client/dbclient_base.cpp
index d0ef3e0ea12..5332e631759 100644
--- a/src/mongo/client/dbclient_base.cpp
+++ b/src/mongo/client/dbclient_base.cpp
@@ -168,7 +168,7 @@ rpc::UniqueReply DBClientBase::parseCommandReplyMessage(const std::string& host,
if (_metadataReader) {
auto opCtx = haveClient() ? cc().getOperationContext() : nullptr;
- uassertStatusOK(_metadataReader(opCtx, commandReply->getMetadata(), host));
+ uassertStatusOK(_metadataReader(opCtx, commandReply->getCommandReply(), host));
}
auto status = getStatusFromCommandResult(commandReply->getCommandReply());
@@ -470,11 +470,10 @@ void DBClientBase::_auth(const BSONObj& params) {
OpMsgRequest::fromDBAndBody(request.dbname, request.cmdObj, request.metadata));
BSONObj data = reply->getCommandReply().getOwned();
- BSONObj metadata = reply->getMetadata().getOwned();
Milliseconds millis(Date_t::now() - start);
// Hand control back to authenticateClient()
- handler({data, metadata, millis});
+ handler({data, millis});
} catch (...) {
handler(exceptionToStatus());