summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/fetch.h
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2014-10-29 18:56:51 -0400
committerDavid Storch <david.storch@10gen.com>2014-11-04 14:24:14 -0500
commitc8012ebc991cd4db85e63c4c61883aef3b793498 (patch)
tree9a0b3fbd3f1b4049b103b95690caaf3db2a9dc0d /src/mongo/db/exec/fetch.h
parentd5f6eb21a94a39bd39c3c7a7b0ac107aca33a7e4 (diff)
downloadmongo-c8012ebc991cd4db85e63c4c61883aef3b793498.tar.gz
SERVER-15665 MMAP v1 requests yields during page faults via NEED_FETCH
Diffstat (limited to 'src/mongo/db/exec/fetch.h')
-rw-r--r--src/mongo/db/exec/fetch.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/exec/fetch.h b/src/mongo/db/exec/fetch.h
index 5cce36d3225..9a26c575733 100644
--- a/src/mongo/db/exec/fetch.h
+++ b/src/mongo/db/exec/fetch.h
@@ -94,6 +94,20 @@ namespace mongo {
// The filter is not owned by us.
const MatchExpression* _filter;
+ // If we want to return a DiskLoc and it points to something that's not in memory,
+ // we return a "please page this in" result. We add a RecordFetcher given back to us by the
+ // storage engine to the WSM. The RecordFetcher is used by the PlanExecutor when it handles
+ // the fetch request.
+ //
+ // Some stages which request fetches don't need to use '_idBeingPagedIn' (e.g.,
+ // CollectionScan) because they are implemented with an underlying iterator which keeps
+ // track of the next WSM to be returned. A FetchStage has no such iterator, but rather
+ // streams its results from the child. Therefore, when it requests a yield via NEED_FETCH,
+ // the current WSM must be saved so that the fetched result can be returned on the next
+ // call to work(). This also requires special invalidation handling not found in stages like
+ // CollectionScan for when '_idBeingPagedIn' is invalidated before it can be returned.
+ WorkingSetID _idBeingPagedIn;
+
// Stats
CommonStats _commonStats;
FetchStats _specificStats;