summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/internal_plans.h
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2014-10-08 17:18:30 -0400
committerDavid Storch <david.storch@10gen.com>2014-10-14 10:30:51 -0400
commiteba8e42b691f704c523fcec1ab5acb9aee8666c3 (patch)
tree9fe1b69ba9b05b83980275ffcab5ceb30b6957e3 /src/mongo/db/query/internal_plans.h
parent282cf4fee1cc3a7660360466c923f4cfaee87499 (diff)
downloadmongo-eba8e42b691f704c523fcec1ab5acb9aee8666c3.tar.gz
SERVER-15541 add PlanExecutor yield policies and registrations
Diffstat (limited to 'src/mongo/db/query/internal_plans.h')
-rw-r--r--src/mongo/db/query/internal_plans.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mongo/db/query/internal_plans.h b/src/mongo/db/query/internal_plans.h
index b623e06aee5..c16aa251f2d 100644
--- a/src/mongo/db/query/internal_plans.h
+++ b/src/mongo/db/query/internal_plans.h
@@ -90,10 +90,8 @@ namespace mongo {
}
CollectionScan* cs = new CollectionScan(txn, params, ws, NULL);
- PlanExecutor* exec = new PlanExecutor(txn, ws, cs, collection);
- // 'exec' will be registered until it is destroyed.
- exec->registerExecInternalPlan();
- return exec;
+ // Takes ownership of 'ws' and 'cs'.
+ return new PlanExecutor(txn, ws, cs, collection);
}
/**
@@ -125,10 +123,7 @@ namespace mongo {
root = new FetchStage(txn, ws, root, NULL, collection);
}
- PlanExecutor* exec = new PlanExecutor(txn, ws, root, collection);
- // 'exec' will be registered until it is destroyed.
- exec->registerExecInternalPlan();
- return exec;
+ return new PlanExecutor(txn, ws, root, collection);
}
};