diff options
author | Matthew Russotto <matthew.russotto@10gen.com> | 2017-07-14 11:39:03 -0400 |
---|---|---|
committer | Matthew Russotto <matthew.russotto@10gen.com> | 2017-07-14 15:21:08 -0400 |
commit | 61453cc84594ce4d3bcea551d2a6e9cce070fc1d (patch) | |
tree | f42c29a7313665dab224de341d9c5cab452972f1 /src/mongo/db/pipeline/document_source_cursor.cpp | |
parent | a9a2772d214b6839ebffaa8c547c1628ffe62e99 (diff) | |
download | mongo-61453cc84594ce4d3bcea551d2a6e9cce070fc1d.tar.gz |
Revert "SERVER-29128 Make $changeNotification stage return a tailable, awaitData cursor that continuously gives out oplog entries"
This reverts commit 3bab15739e421e9eed4bf180cbcf5c7392a9a90d.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_cursor.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_cursor.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mongo/db/pipeline/document_source_cursor.cpp b/src/mongo/db/pipeline/document_source_cursor.cpp index f15bafd5b8b..9704d826e53 100644 --- a/src/mongo/db/pipeline/document_source_cursor.cpp +++ b/src/mongo/db/pipeline/document_source_cursor.cpp @@ -31,6 +31,7 @@ #include "mongo/db/pipeline/document_source_cursor.h" #include "mongo/db/catalog/collection.h" +#include "mongo/db/curop.h" #include "mongo/db/db_raii.h" #include "mongo/db/exec/working_set_common.h" #include "mongo/db/pipeline/document.h" @@ -98,21 +99,12 @@ void DocumentSourceCursor::loadBatch() { memUsageBytes += _currentBatch.back().getApproximateSize(); - // As long as we're waiting for inserts, we shouldn't do any batching at this level - // we need the whole pipeline to see each document to see if we should stop waiting. - if (shouldWaitForInserts(pExpCtx->opCtx) || - memUsageBytes > internalDocumentSourceCursorBatchSizeBytes.load()) { + if (memUsageBytes > internalDocumentSourceCursorBatchSizeBytes.load()) { // End this batch and prepare PlanExecutor for yielding. _exec->saveState(); return; } } - // Special case for tailable cursor -- EOF doesn't preclude more results, so keep - // the PlanExecutor alive. - if (state == PlanExecutor::IS_EOF && pExpCtx->isTailable()) { - _exec->saveState(); - return; - } } } |