summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/fetch.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-04-23 16:17:05 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-04-24 12:26:24 -0400
commitc7f47206ec84013a595d764a3542a3e9ac0305fd (patch)
tree5118d1bca0f8223a13be4a07f5fa58d7137add57 /src/mongo/db/exec/fetch.h
parente02aec12a1af456223482fa0e968440700f2e7cc (diff)
downloadmongo-c7f47206ec84013a595d764a3542a3e9ac0305fd.tar.gz
SERVER-13632 Pass the collection to PlanExecutor and FetchStage
Diffstat (limited to 'src/mongo/db/exec/fetch.h')
-rw-r--r--src/mongo/db/exec/fetch.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/db/exec/fetch.h b/src/mongo/db/exec/fetch.h
index 0b05dc389b5..ad32a3ec9ed 100644
--- a/src/mongo/db/exec/fetch.h
+++ b/src/mongo/db/exec/fetch.h
@@ -45,7 +45,11 @@ namespace mongo {
*/
class FetchStage : public PlanStage {
public:
- FetchStage(WorkingSet* ws, PlanStage* child, const MatchExpression* filter);
+ FetchStage(WorkingSet* ws,
+ PlanStage* child,
+ const MatchExpression* filter,
+ const Collection* collection);
+
virtual ~FetchStage();
virtual bool isEOF();
@@ -58,6 +62,7 @@ namespace mongo {
PlanStageStats* getStats();
private:
+
/**
* If the member (with id memberID) passes our filter, set *out to memberID and return that
* ADVANCED. Otherwise, free memberID and return NEED_TIME.
@@ -70,6 +75,10 @@ namespace mongo {
*/
StageState fetchCompleted(WorkingSetID* out);
+ // Collection which is used by this stage. Used to resolve record ids retrieved by child
+ // stages. The lifetime of the collection must supersede that of the stage.
+ const Collection* _collection;
+
// _ws is not owned by us.
WorkingSet* _ws;
scoped_ptr<PlanStage> _child;