From d6c618fc94ebdfdba5d270e396a084290a54d360 Mon Sep 17 00:00:00 2001 From: David Storch Date: Fri, 26 Oct 2018 17:21:58 -0400 Subject: SERVER-37444 Added RequiresCollectionStage and use for COLLSCAN. This is a pure refactor with no user-facing changes. It is the first step in making PlanExecutors check their own validity during yield recovery, rather than requiring the invalidating actor to issue a kill notification. --- src/mongo/dbtests/query_stage_count.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mongo/dbtests/query_stage_count.cpp') diff --git a/src/mongo/dbtests/query_stage_count.cpp b/src/mongo/dbtests/query_stage_count.cpp index c6ab01e62c8..82d7cef339e 100644 --- a/src/mongo/dbtests/query_stage_count.cpp +++ b/src/mongo/dbtests/query_stage_count.cpp @@ -91,11 +91,10 @@ public: WorkingSet ws; CollectionScanParams params; - params.collection = _coll; params.direction = CollectionScanParams::FORWARD; params.tailable = false; - unique_ptr scan(new CollectionScan(&_opCtx, params, &ws, NULL)); + unique_ptr scan(new CollectionScan(&_opCtx, _coll, params, &ws, NULL)); while (!scan->isEOF()) { WorkingSetID id = WorkingSet::INVALID_ID; PlanStage::StageState state = scan->work(&id); @@ -221,10 +220,9 @@ public: CollectionScan* createCollScan(MatchExpression* expr, WorkingSet* ws) { CollectionScanParams params; - params.collection = _coll; // This child stage gets owned and freed by its parent CountStage - return new CollectionScan(&_opCtx, params, ws, expr); + return new CollectionScan(&_opCtx, _coll, params, ws, expr); } static const char* ns() { -- cgit v1.2.1