summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/multi_plan.cpp
diff options
context:
space:
mode:
authorQingyang Chen <qingyang.chen@10gen.com>2015-08-03 12:17:47 -0400
committerQingyang Chen <qingyang.chen@10gen.com>2015-08-04 16:12:30 -0400
commitbe8a683771004a2541c730a1ac0e35cd13e03a8b (patch)
tree20b31de1fea9f59011899b568771f069327f113f /src/mongo/db/exec/multi_plan.cpp
parent84182ff1575cbe868a89e7209f12ca665f4bda19 (diff)
downloadmongo-be8a683771004a2541c730a1ac0e35cd13e03a8b.tar.gz
SERVER-19364 move query stage OperationContext pointer management into the base class
Diffstat (limited to 'src/mongo/db/exec/multi_plan.cpp')
-rw-r--r--src/mongo/db/exec/multi_plan.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mongo/db/exec/multi_plan.cpp b/src/mongo/db/exec/multi_plan.cpp
index 18188ab6b68..1f50464039a 100644
--- a/src/mongo/db/exec/multi_plan.cpp
+++ b/src/mongo/db/exec/multi_plan.cpp
@@ -65,8 +65,7 @@ MultiPlanStage::MultiPlanStage(OperationContext* txn,
const Collection* collection,
CanonicalQuery* cq,
bool shouldCache)
- : PlanStage(kStageType),
- _txn(txn),
+ : PlanStage(kStageType, txn),
_collection(collection),
_shouldCache(shouldCache),
_query(cq),
@@ -219,7 +218,7 @@ Status MultiPlanStage::pickBestPlan(PlanYieldPolicy* yieldPolicy) {
// make sense.
ScopedTimer timer(&_commonStats.executionTimeMillis);
- size_t numWorks = getTrialPeriodWorks(_txn, _collection);
+ size_t numWorks = getTrialPeriodWorks(getOpCtx(), _collection);
size_t numResults = getTrialPeriodNumToReturn(*_query);
// Work the plans, stopping when a plan hits EOF or returns some
@@ -388,10 +387,6 @@ bool MultiPlanStage::workAllPlans(size_t numResults, PlanYieldPolicy* yieldPolic
return !doneWorking;
}
-void MultiPlanStage::doReattachToOperationContext(OperationContext* opCtx) {
- _txn = opCtx;
-}
-
namespace {
void invalidateHelper(OperationContext* txn,