summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_fetcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/oplog_fetcher.cpp')
-rw-r--r--src/mongo/db/repl/oplog_fetcher.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/repl/oplog_fetcher.cpp b/src/mongo/db/repl/oplog_fetcher.cpp
index bc23fa0d029..087bb34bbaa 100644
--- a/src/mongo/db/repl/oplog_fetcher.cpp
+++ b/src/mongo/db/repl/oplog_fetcher.cpp
@@ -959,9 +959,8 @@ StatusWith<NewOplogFetcher::Documents> NewOplogFetcher::_getNextBatch() {
// The 'find' command has already been executed, so reset the socket timeout to reflect
// the awaitData timeout with a network buffer.
_setSocketTimeout(durationCount<Milliseconds>(_awaitDataTimeout));
- } else if (!_cursor->more()) {
- // The only reason more() should return false is if the cursor is dead.
- invariant(_cursor->isDead());
+ } else {
+ _cursor->more();
}
while (_cursor->moreInCurrentBatch()) {