diff options
author | David Storch <david.storch@mongodb.com> | 2020-08-25 15:33:25 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-27 00:48:20 +0000 |
commit | 6663d804ebf22ec5c4295d082ad3685bf801da6b (patch) | |
tree | 41ecd321f54167a4b727d7347fe11cace3cb6d78 /src/mongo/db/exec | |
parent | 0a7438226e93c85ce52471478b3440db77b3688b (diff) | |
download | mongo-6663d804ebf22ec5c4295d082ad3685bf801da6b.tar.gz |
SERVER-37453 Delete PlanStage::dispose()
Diffstat (limited to 'src/mongo/db/exec')
-rw-r--r-- | src/mongo/db/exec/plan_stage.h | 27 | ||||
-rw-r--r-- | src/mongo/db/exec/trial_stage.cpp | 9 | ||||
-rw-r--r-- | src/mongo/db/exec/trial_stage.h | 1 |
3 files changed, 0 insertions, 37 deletions
diff --git a/src/mongo/db/exec/plan_stage.h b/src/mongo/db/exec/plan_stage.h index a0621d95a8c..4392837219c 100644 --- a/src/mongo/db/exec/plan_stage.h +++ b/src/mongo/db/exec/plan_stage.h @@ -281,28 +281,6 @@ public: */ void reattachToOperationContext(OperationContext* opCtx); - /* - * Releases any resources held by this stage. It is an error to use a PlanStage in any way after - * calling dispose(). Does not throw exceptions. - * - * Propagates to all children, then calls doDispose(). - */ - void dispose(OperationContext* opCtx) { - try { - // We may or may not be attached during disposal. We can't call - // reattachToOperationContext() - // directly, since that will assert that '_opCtx' is not set. - _opCtx = opCtx; - - for (auto&& child : _children) { - child->dispose(opCtx); - } - doDispose(); - } catch (...) { - std::terminate(); - } - } - /** * Retrieve a list of this stage's children. This stage keeps ownership of * its children. @@ -404,11 +382,6 @@ protected: */ virtual void doReattachToOperationContext() {} - /** - * Does stage-specific destruction. Must not throw exceptions. - */ - virtual void doDispose() {} - ClockSource* getClock() const; OperationContext* opCtx() const { diff --git a/src/mongo/db/exec/trial_stage.cpp b/src/mongo/db/exec/trial_stage.cpp index a6d59112d16..32d303c8f7d 100644 --- a/src/mongo/db/exec/trial_stage.cpp +++ b/src/mongo/db/exec/trial_stage.cpp @@ -199,13 +199,4 @@ void TrialStage::doReattachToOperationContext() { } } -void TrialStage::doDispose() { - if (_backupPlan) { - _backupPlan->dispose(opCtx()); - } - if (_queuedData) { - _queuedData->dispose(opCtx()); - } -} - } // namespace mongo diff --git a/src/mongo/db/exec/trial_stage.h b/src/mongo/db/exec/trial_stage.h index 9da1d04beab..674ee56cbf4 100644 --- a/src/mongo/db/exec/trial_stage.h +++ b/src/mongo/db/exec/trial_stage.h @@ -95,7 +95,6 @@ public: protected: void doDetachFromOperationContext() final; void doReattachToOperationContext() final; - void doDispose() final; private: void _replaceCurrentPlan(std::unique_ptr<PlanStage>& newPlan); |