diff options
author | Jason Rassi <rassi@10gen.com> | 2015-08-27 19:39:09 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-08-28 17:42:01 -0400 |
commit | 9eb318778fa0d16d2156db5f9cee3c6ad17d507c (patch) | |
tree | 3b27a388c89025341e9fbdad6fb843fab004f25b /src/mongo/s/query/async_results_merger.h | |
parent | 1f73154b39e5d404f92558d3ca6baebaef6bfacc (diff) | |
download | mongo-9eb318778fa0d16d2156db5f9cee3c6ad17d507c.tar.gz |
SERVER-19569 AsyncResultsMerger ability to merge existing cursors
Diffstat (limited to 'src/mongo/s/query/async_results_merger.h')
-rw-r--r-- | src/mongo/s/query/async_results_merger.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mongo/s/query/async_results_merger.h b/src/mongo/s/query/async_results_merger.h index 1070e40e0a8..ba52c5ed08b 100644 --- a/src/mongo/s/query/async_results_merger.h +++ b/src/mongo/s/query/async_results_merger.h @@ -167,15 +167,22 @@ private: bool exhausted() const; HostAndPort hostAndPort; - BSONObj cmdObj; + + // The command object for sending to the remote to establish the cursor. If a remote cursor + // has not been established yet, this member will be set to a valid command object. If a + // remote cursor has already been established, this member will be unset. + boost::optional<BSONObj> cmdObj; + + // The cursor id for the remote cursor. If a remote cursor has not been established yet, + // this member will be unset. If a remote cursor has been established and is not yet + // exhausted, this member will be set to a valid non-zero cursor id. If a remote cursor was + // established but is now exhausted, this member will be set to zero. boost::optional<CursorId> cursorId; + std::queue<BSONObj> docBuffer; executor::TaskExecutor::CallbackHandle cbHandle; Status status = Status::OK(); - // Set to true once we have heard from the remote node at least once. - bool gotFirstResponse = false; - // Count of fetched docs during ARM processing of the current batch. Used to reduce the // batchSize in getMore when mongod returned less docs than the requested batchSize. long long fetchedCount = 0; |