diff options
author | David Storch <david.storch@10gen.com> | 2018-10-30 12:30:20 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2018-11-07 15:05:49 -0500 |
commit | f0b39d9184094661fcaa1049531b80b5ad6b3995 (patch) | |
tree | 6fcab5eb450ca32fc7683de08bac184cf9dda15d /src/mongo/db/exec/stagedebug_cmd.cpp | |
parent | 56248d50536a25d63526662683b221df8137ab36 (diff) | |
download | mongo-f0b39d9184094661fcaa1049531b80b5ad6b3995.tar.gz |
SERVER-37446 Change PlanStages which don't require a collection to avoid keeping a Collection*.
In order to prevent COUNT stage from requiring a Collection*, splits
fast count into a new RECORD_STORE_FAST_COUNT stage.
Diffstat (limited to 'src/mongo/db/exec/stagedebug_cmd.cpp')
-rw-r--r-- | src/mongo/db/exec/stagedebug_cmd.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/mongo/db/exec/stagedebug_cmd.cpp b/src/mongo/db/exec/stagedebug_cmd.cpp index 2cb843ea293..df13e4a5985 100644 --- a/src/mongo/db/exec/stagedebug_cmd.cpp +++ b/src/mongo/db/exec/stagedebug_cmd.cpp @@ -316,7 +316,7 @@ public: uassert( 16921, "Nodes argument must be provided to AND", nodeArgs["nodes"].isABSONObj()); - auto andStage = make_unique<AndHashStage>(opCtx, workingSet, collection); + auto andStage = make_unique<AndHashStage>(opCtx, workingSet); int nodesAdded = 0; BSONObjIterator it(nodeArgs["nodes"].Obj()); @@ -339,7 +339,7 @@ public: uassert( 16924, "Nodes argument must be provided to AND", nodeArgs["nodes"].isABSONObj()); - auto andStage = make_unique<AndSortedStage>(opCtx, workingSet, collection); + auto andStage = make_unique<AndSortedStage>(opCtx, workingSet); int nodesAdded = 0; BSONObjIterator it(nodeArgs["nodes"].Obj()); @@ -424,21 +424,7 @@ public: } return new CollectionScan(opCtx, collection, params, workingSet, matcher); - } -// sort is disabled for now. -#if 0 - else if ("sort" == nodeName) { - uassert(16969, "Node argument must be provided to sort", - nodeArgs["node"].isABSONObj()); - uassert(16970, "Pattern argument must be provided to sort", - nodeArgs["pattern"].isABSONObj()); - PlanStage* subNode = parseQuery(opCtx, db, nodeArgs["node"].Obj(), workingSet, exprs); - SortStageParams params; - params.pattern = nodeArgs["pattern"].Obj(); - return new SortStage(params, workingSet, subNode); - } -#endif - else if ("mergeSort" == nodeName) { + } else if ("mergeSort" == nodeName) { uassert( 16971, "Nodes argument must be provided to sort", nodeArgs["nodes"].isABSONObj()); uassert(16972, @@ -449,7 +435,7 @@ public: params.pattern = nodeArgs["pattern"].Obj(); // Dedup is true by default. - auto mergeStage = make_unique<MergeSortStage>(opCtx, params, workingSet, collection); + auto mergeStage = make_unique<MergeSortStage>(opCtx, params, workingSet); BSONObjIterator it(nodeArgs["nodes"].Obj()); while (it.more()) { |