diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2014-09-27 03:15:29 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2014-10-01 18:00:30 -0400 |
commit | b1c3d803d97c455c00ffb034296128434f5c7616 (patch) | |
tree | 2ff2c568384af580ea6eeadd03eee3f0db72e809 /src/mongo/db/exec/near.h | |
parent | 78919da3438c114bf14d7a08f0710043910829be (diff) | |
download | mongo-b1c3d803d97c455c00ffb034296128434f5c7616.tar.gz |
SERVER-15450 Avoid getStats() and keep interval stages as children in NearStage
Diffstat (limited to 'src/mongo/db/exec/near.h')
-rw-r--r-- | src/mongo/db/exec/near.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mongo/db/exec/near.h b/src/mongo/db/exec/near.h index dd0dcdaf721..646bc7f764d 100644 --- a/src/mongo/db/exec/near.h +++ b/src/mongo/db/exec/near.h @@ -161,9 +161,6 @@ namespace mongo { SearchState_Finished } _searchState; - // The current stage from which this stage should buffer results - scoped_ptr<CoveredInterval> _nextInterval; - // May need to track disklocs from the child stage to do our own deduping, also to do // invalidation of buffered results. unordered_map<DiskLoc, WorkingSetID, DiskLoc::Hasher> _nextIntervalSeen; @@ -177,6 +174,16 @@ namespace mongo { // Stats scoped_ptr<PlanStageStats> _stats; + + // The current stage from which this stage should buffer results + // Pointer to the last interval in _childrenIntervals. Owned by _childrenIntervals. + CoveredInterval* _nextInterval; + + // All children CoveredIntervals and the sub-stages owned by them. + // + // All children intervals except the last active one are only used by getStats(), + // because they are all EOF. + OwnedPointerVector<CoveredInterval> _childrenIntervals; }; /** @@ -190,7 +197,8 @@ namespace mongo { double maxDistance, bool inclusiveMax); - const scoped_ptr<PlanStage> covering; + // Owned by NearStage + scoped_ptr<PlanStage> const covering; const bool dedupCovering; const double minDistance; |