diff options
Diffstat (limited to 'src/mongo/db/query/plan_executor_impl.h')
-rw-r--r-- | src/mongo/db/query/plan_executor_impl.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/mongo/db/query/plan_executor_impl.h b/src/mongo/db/query/plan_executor_impl.h index ba0bdd58a9b..ac586aef59b 100644 --- a/src/mongo/db/query/plan_executor_impl.h +++ b/src/mongo/db/query/plan_executor_impl.h @@ -32,6 +32,7 @@ #include <boost/optional.hpp> #include <queue> +#include "mongo/db/exec/multi_plan.h" #include "mongo/db/exec/working_set.h" #include "mongo/db/query/plan_executor.h" #include "mongo/db/query/query_solution.h" @@ -39,6 +40,7 @@ namespace mongo { class CappedInsertNotifier; +class CollectionScan; struct CappedInsertNotifierData; class PlanExecutorImpl : public PlanExecutor { @@ -83,7 +85,9 @@ public: Timestamp getLatestOplogTimestamp() const final; BSONObj getPostBatchResumeToken() const final; LockPolicy lockPolicy() const final; - bool isPipelineExecutor() const final; + std::string getPlanSummary() const final; + void getSummaryStats(PlanSummaryStats* statsOut) const final; + BSONObj getStats() const final; /** * Same as restoreState() but without the logic to retry if a WriteConflictException is thrown. @@ -92,6 +96,11 @@ public: */ void restoreStateWithoutRetrying(); + /** + * Return a pointer to this executor's MultiPlanStage, or nullptr if it does not have one. + */ + MultiPlanStage* getMultiPlanStage() const; + private: /** * Called on construction in order to ensure that when callers receive a new instance of a @@ -177,12 +186,11 @@ private: enum { kUsable, kSaved, kDetached, kDisposed } _currentState = kUsable; - // A pointer either to a ChangeStreamProxy or a CollectionScan stage, if present in the - // execution tree, or nullptr otherwise. We cache it to avoid the need to traverse the execution - // tree in runtime when the executor is requested to return the oplog tracking info. Since this - // info is provided by either of these stages, the executor will simply delegate the request to - // the cached stage. - const PlanStage* _oplogTrackingStage{nullptr}; + // A pointer either to a CollectionScan stage, if present in the execution tree, or nullptr + // otherwise. We cache it to avoid the need to traverse the execution tree in runtime when the + // executor is requested to return the oplog tracking info. Since this info is provided by + // either of these stages, the executor will simply delegate the request to the cached stage. + const CollectionScan* _collScanStage{nullptr}; }; } // namespace mongo |