summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbdirectclient.cpp
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2016-12-10 22:01:46 -0500
committerAndrew Morrow <acm@mongodb.com>2016-12-14 09:22:24 -0500
commita20ff1fe0d639d703314b36031d829c8713c2a91 (patch)
tree6f03762fc5daaf812400513b8bfddfb9a4222aee /src/mongo/db/dbdirectclient.cpp
parent64f1ca4537d17ea65ceeb05885b48732a314cc02 (diff)
downloadmongo-a20ff1fe0d639d703314b36031d829c8713c2a91.tar.gz
SERVER-23103 Move assembleResposne to its own library
Diffstat (limited to 'src/mongo/db/dbdirectclient.cpp')
-rw-r--r--src/mongo/db/dbdirectclient.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp
index f4bf62ed644..40fcdb79dc2 100644
--- a/src/mongo/db/dbdirectclient.cpp
+++ b/src/mongo/db/dbdirectclient.cpp
@@ -32,9 +32,10 @@
#include "mongo/db/dbdirectclient.h"
+#include "mongo/db/assemble_response.h"
#include "mongo/db/client.h"
#include "mongo/db/commands.h"
-#include "mongo/db/instance.h"
+#include "mongo/db/curop.h"
#include "mongo/db/lasterror.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/wire_version.h"
@@ -124,7 +125,7 @@ bool DBDirectClient::call(Message& toSend, Message& response, bool assertOk, str
DbResponse dbResponse;
CurOp curOp(_txn);
- assembleResponse(_txn, toSend, dbResponse, dummyHost);
+ assembleResponse(_txn, toSend, dbResponse, kHostAndPortForDirectClient);
verify(!dbResponse.response.empty());
response = std::move(dbResponse.response);
@@ -137,7 +138,7 @@ void DBDirectClient::say(Message& toSend, bool isRetry, string* actualServer) {
DbResponse dbResponse;
CurOp curOp(_txn);
- assembleResponse(_txn, toSend, dbResponse, dummyHost);
+ assembleResponse(_txn, toSend, dbResponse, kHostAndPortForDirectClient);
}
unique_ptr<DBClientCursor> DBDirectClient::query(const string& ns,
@@ -151,8 +152,6 @@ unique_ptr<DBClientCursor> DBDirectClient::query(const string& ns,
ns, query, nToReturn, nToSkip, fieldsToReturn, queryOptions, batchSize);
}
-const HostAndPort DBDirectClient::dummyHost("0.0.0.0", 0);
-
unsigned long long DBDirectClient::count(
const string& ns, const BSONObj& query, int options, int limit, int skip) {
BSONObj cmdObj = _countCmd(ns, query, options, limit, skip);