summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_cursor.cpp
diff options
context:
space:
mode:
authorXinhao Zhang <xinhao.zhang@mongodb.com>2019-08-16 20:43:48 +0000
committerevergreen <evergreen@mongodb.com>2019-08-16 20:43:48 +0000
commitf83f5784ea56d8158f8da654a964d1cd1d142648 (patch)
treed3cac5b51ef6ed7b1f727773a155fc17af3c3694 /src/mongo/db/pipeline/document_source_cursor.cpp
parent25418e659b3ed6d09a41c147683fa9493d1ffa29 (diff)
downloadmongo-f83f5784ea56d8158f8da654a964d1cd1d142648.tar.gz
SERVER-42584 PlanStageStats in aggregation
Diffstat (limited to 'src/mongo/db/pipeline/document_source_cursor.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_cursor.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/document_source_cursor.cpp b/src/mongo/db/pipeline/document_source_cursor.cpp
index 934f37d2d1d..fde3c279d33 100644
--- a/src/mongo/db/pipeline/document_source_cursor.cpp
+++ b/src/mongo/db/pipeline/document_source_cursor.cpp
@@ -53,12 +53,10 @@ using std::shared_ptr;
using std::string;
const char* DocumentSourceCursor::getSourceName() const {
- return "$cursor";
+ return kStageName.rawData();
}
-DocumentSource::GetNextResult DocumentSourceCursor::getNext() {
- pExpCtx->checkForInterrupt();
-
+DocumentSource::GetNextResult DocumentSourceCursor::doGetNext() {
if (_currentBatch.empty()) {
loadBatch();
}
@@ -308,7 +306,7 @@ DocumentSourceCursor::DocumentSourceCursor(
std::unique_ptr<PlanExecutor, PlanExecutor::Deleter> exec,
const intrusive_ptr<ExpressionContext>& pCtx,
bool trackOplogTimestamp)
- : DocumentSource(pCtx),
+ : DocumentSource(kStageName, pCtx),
_docsAddedToBatches(0),
_exec(std::move(exec)),
_trackOplogTS(trackOplogTimestamp) {