diff options
author | Benety Goh <benety@mongodb.com> | 2015-07-09 00:09:16 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2015-07-09 10:04:56 -0400 |
commit | f316ff5af270da92c63f412c2238fa1e5b6e599d (patch) | |
tree | ebc337205534aa651a447a4513a4f520a76e685a /src/mongo/db/repl | |
parent | fb1c2681c149d1b76a190444522af252149e496e (diff) | |
download | mongo-f316ff5af270da92c63f412c2238fa1e5b6e599d.tar.gz |
SERVER-19307 added 'first' to fetcher QueryResponse to indicate if the current response is for the initial command request
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/data_replicator.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/db/repl/data_replicator.cpp b/src/mongo/db/repl/data_replicator.cpp index feb2ec711b2..55499077fa7 100644 --- a/src/mongo/db/repl/data_replicator.cpp +++ b/src/mongo/db/repl/data_replicator.cpp @@ -144,13 +144,11 @@ std::string OplogFetcher::toString() const { void OplogFetcher::_delegateCallback(const Fetcher::QueryResponseStatus& fetchResult, Fetcher::NextAction* nextAction) { - const bool checkStartTS = _getResponses() == 0; - if (fetchResult.isOK()) { Fetcher::Documents::const_iterator firstDoc = fetchResult.getValue().documents.begin(); auto hasDoc = firstDoc != fetchResult.getValue().documents.end(); - if (checkStartTS) { + if (fetchResult.getValue().first) { if (!hasDoc) { // Set next action to none. *nextAction = Fetcher::NextAction::kNoAction; |