summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/plan_executor.cpp
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2016-08-04 12:49:28 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2016-08-04 12:49:28 -0400
commit5149b0f8a55085808cc6e34dcba491f2278ec3cf (patch)
tree1458da2e0bdbd08c0df57bdb60ce267614252d6c /src/mongo/db/query/plan_executor.cpp
parentad86d29a2cc93144dd2a143feaac415aa062ab99 (diff)
downloadmongo-5149b0f8a55085808cc6e34dcba491f2278ec3cf.tar.gz
SERVER-25005 Use Pipeline to execute $lookup and $graphLookup.
Replaces the usages of DBDirectClient::query() in DocumentSourceLookUp and DocumentSourceGraphLookUp to instead parse and execute a Pipeline. Simplifies the registration process of the "inner" plan execution in an aggregation pipeline. The DocumentSourceCursor class now owns its PlanExecutor and the PipelineProxyStage class no longer has a std::weak_ptr to it. The "inner" plan executor is registered with the CursorManager of the underlying Collection and will receive invalidation notifications if a catalog operation occurs.
Diffstat (limited to 'src/mongo/db/query/plan_executor.cpp')
-rw-r--r--src/mongo/db/query/plan_executor.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/mongo/db/query/plan_executor.cpp b/src/mongo/db/query/plan_executor.cpp
index 395e84ce1a7..3b4159facbc 100644
--- a/src/mongo/db/query/plan_executor.cpp
+++ b/src/mongo/db/query/plan_executor.cpp
@@ -517,29 +517,6 @@ void PlanExecutor::deregisterExec() {
void PlanExecutor::kill(string reason) {
_killReason = std::move(reason);
-
- // XXX: PlanExecutor is designed to wrap a single execution tree. In the case of
- // aggregation queries, PlanExecutor wraps a proxy stage responsible for pulling results
- // from an aggregation pipeline. The aggregation pipeline pulls results from yet another
- // PlanExecutor. Such nested PlanExecutors require us to manually propagate kill() to
- // the "inner" executor. This is bad, and hopefully can be fixed down the line with the
- // unification of agg and query.
- //
- // The CachedPlanStage is another special case. It needs to update the plan cache from
- // its destructor. It needs to know whether it has been killed so that it can avoid
- // touching a potentially invalid plan cache in this case.
- //
- // TODO: get rid of this code block.
- {
- PlanStage* foundStage = getStageByType(_root.get(), STAGE_PIPELINE_PROXY);
- if (foundStage) {
- PipelineProxyStage* proxyStage = static_cast<PipelineProxyStage*>(foundStage);
- shared_ptr<PlanExecutor> childExec = proxyStage->getChildExecutor();
- if (childExec) {
- childExec->kill(*_killReason);
- }
- }
- }
}
Status PlanExecutor::executePlan() {