diff options
author | Mathias Stearn <mathias@10gen.com> | 2016-06-06 14:08:29 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2016-06-22 16:04:36 -0400 |
commit | e508ddcb51eec941ae50d9c2efb06b601811dc19 (patch) | |
tree | cab51e8665c29d8220b64e7f69a8bbc592ca5339 /src/mongo/db/dbdirectclient.cpp | |
parent | 40f20eca105a5e06a72df583ac654f946e9b058e (diff) | |
download | mongo-e508ddcb51eec941ae50d9c2efb06b601811dc19.tar.gz |
SERVER-24418 Make Message and BufBuilder use SharedBuffer for memory management
This makes it possible to get owned BSONObj out of a Message without copying.
Hooked up to the following places:
- Anything using the Fetcher (including oplog fetching on secondaries)
- Anything using DBClientInterface::findOne()
- Anything using CursorResponse (including Sharded queries)
As a simplification, Messages no longer support non-contiguous buffers, or
non-owning buffers. The former wasn't used by anything, and the latter was
only used by mongosniff only for messages that fit in a single packet.
Diffstat (limited to 'src/mongo/db/dbdirectclient.cpp')
-rw-r--r-- | src/mongo/db/dbdirectclient.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp index 763b6e3dde2..06c06991722 100644 --- a/src/mongo/db/dbdirectclient.cpp +++ b/src/mongo/db/dbdirectclient.cpp @@ -126,9 +126,6 @@ bool DBDirectClient::call(Message& toSend, Message& response, bool assertOk, str CurOp curOp(_txn); assembleResponse(_txn, toSend, dbResponse, dummyHost); verify(!dbResponse.response.empty()); - - // can get rid of this if we make response handling smarter - dbResponse.response.concat(); response = std::move(dbResponse.response); return true; |