diff options
author | David Storch <david.storch@10gen.com> | 2015-01-14 16:22:46 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-01-15 09:54:09 -0500 |
commit | ea2209e6399ef285efc31700ac67388885d614b0 (patch) | |
tree | 99c7a6fad6629aba4b555dce3476255b7a0686ed /src/mongo/db/exec/plan_stats.h | |
parent | 5e42956e1c816dad5ffd5334565ddc623eebe6d2 (diff) | |
download | mongo-ea2209e6399ef285efc31700ac67388885d614b0.tar.gz |
SERVER-16807 update and delete stages should skip over invalidated documents (MMAP v1)
Diffstat (limited to 'src/mongo/db/exec/plan_stats.h')
-rw-r--r-- | src/mongo/db/exec/plan_stats.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mongo/db/exec/plan_stats.h b/src/mongo/db/exec/plan_stats.h index a36dbe1f839..59ce77035cb 100644 --- a/src/mongo/db/exec/plan_stats.h +++ b/src/mongo/db/exec/plan_stats.h @@ -266,13 +266,17 @@ namespace mongo { }; struct DeleteStats : public SpecificStats { - DeleteStats() : docsDeleted(0) { } + DeleteStats() : docsDeleted(0), nInvalidateSkips(0) { } virtual SpecificStats* clone() const { return new DeleteStats(*this); } size_t docsDeleted; + + // Invalidated documents can be force-fetched, causing the now invalid RecordId to + // be thrown out. The delete stage skips over any results which do not have a RecordId. + size_t nInvalidateSkips; }; struct DistinctScanStats : public SpecificStats { @@ -596,7 +600,8 @@ namespace mongo { isDocReplacement(false), fastmod(false), fastmodinsert(false), - inserted(false) { } + inserted(false), + nInvalidateSkips(0) { } virtual SpecificStats* clone() const { return new UpdateStats(*this); @@ -626,6 +631,11 @@ namespace mongo { // The object that was inserted. This is an empty document if no insert was performed. BSONObj objInserted; + + // Invalidated documents can be force-fetched, causing the now invalid RecordId to + // be thrown out. The update stage skips over any results which do not have the + // RecordId to update. + size_t nInvalidateSkips; }; struct TextStats : public SpecificStats { |