diff options
author | David Storch <david.storch@10gen.com> | 2018-10-26 17:21:58 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2018-10-31 17:26:35 -0400 |
commit | d6c618fc94ebdfdba5d270e396a084290a54d360 (patch) | |
tree | 81f42ec3ebe8522ebbca4e95a6c1615fccfbdb26 /src/mongo/dbtests/query_stage_count.cpp | |
parent | 5180b48eedec5e57e7f12f734d173184bbff2af7 (diff) | |
download | mongo-d6c618fc94ebdfdba5d270e396a084290a54d360.tar.gz |
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.
Diffstat (limited to 'src/mongo/dbtests/query_stage_count.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_count.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<CollectionScan> scan(new CollectionScan(&_opCtx, params, &ws, NULL)); + unique_ptr<CollectionScan> 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() { |