diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2017-04-17 12:09:33 -0400 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2017-04-21 11:22:53 -0400 |
commit | f929d2cfcfe48f051c32bdded11566b885816932 (patch) | |
tree | 2d4e17c2dd4cceaa95dfcb41c773962341e7a5ec /src/mongo/db/dbdirectclient.cpp | |
parent | c2cb98f46c70772d054ab0885720b666ae318cf0 (diff) | |
download | mongo-f929d2cfcfe48f051c32bdded11566b885816932.tar.gz |
SERVER-28749 Unify ServiceEntryPointMongod and ServiceEntryPointMongos
Diffstat (limited to 'src/mongo/db/dbdirectclient.cpp')
-rw-r--r-- | src/mongo/db/dbdirectclient.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp index 5b1499da351..60a001f534e 100644 --- a/src/mongo/db/dbdirectclient.cpp +++ b/src/mongo/db/dbdirectclient.cpp @@ -123,10 +123,9 @@ bool DBDirectClient::call(Message& toSend, Message& response, bool assertOk, str DirectClientScope directClientScope(_opCtx); LastError::get(_opCtx->getClient()).startRequest(); - DbResponse dbResponse; CurOp curOp(_opCtx); - assembleResponse(_opCtx, toSend, dbResponse, kHostAndPortForDirectClient); - verify(!dbResponse.response.empty()); + auto dbResponse = assembleResponse(_opCtx, toSend, kHostAndPortForDirectClient); + invariant(!dbResponse.response.empty()); response = std::move(dbResponse.response); return true; @@ -136,9 +135,9 @@ void DBDirectClient::say(Message& toSend, bool isRetry, string* actualServer) { DirectClientScope directClientScope(_opCtx); LastError::get(_opCtx->getClient()).startRequest(); - DbResponse dbResponse; CurOp curOp(_opCtx); - assembleResponse(_opCtx, toSend, dbResponse, kHostAndPortForDirectClient); + auto dbResponse = assembleResponse(_opCtx, toSend, kHostAndPortForDirectClient); + invariant(dbResponse.response.empty()); } unique_ptr<DBClientCursor> DBDirectClient::query(const string& ns, |