summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/merge_sort.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-01-08 17:31:20 -0500
committerDavid Storch <david.storch@10gen.com>2016-01-13 12:02:15 -0500
commitc2edffac9d7da55422e56213076fabdfbd8e7bb1 (patch)
tree2dc03ceca6d7ec4911672d189fc15ede997692d6 /src/mongo/db/exec/merge_sort.cpp
parentdb54c89ec37618c11f913f01c77820f6b699b9ed (diff)
downloadmongo-c2edffac9d7da55422e56213076fabdfbd8e7bb1.tar.gz
SERVER-15962 only use KEEP_MUTATIONS for index intersection plans
It is no longer required for other plans.
Diffstat (limited to 'src/mongo/db/exec/merge_sort.cpp')
-rw-r--r--src/mongo/db/exec/merge_sort.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mongo/db/exec/merge_sort.cpp b/src/mongo/db/exec/merge_sort.cpp
index 5c1bbb64e3a..10c85b68304 100644
--- a/src/mongo/db/exec/merge_sort.cpp
+++ b/src/mongo/db/exec/merge_sort.cpp
@@ -180,11 +180,6 @@ PlanStage::StageState MergeSortStage::work(WorkingSetID* out) {
*out = idToTest;
++_commonStats.advanced;
- // But don't return it if it's flagged.
- if (_ws->isFlagged(*out)) {
- return PlanStage::NEED_TIME;
- }
-
return PlanStage::ADVANCED;
}
@@ -198,16 +193,15 @@ void MergeSortStage::doInvalidate(OperationContext* txn,
valueIt++) {
WorkingSetMember* member = _ws->get(valueIt->id);
if (member->hasLoc() && (dl == member->loc)) {
- // Force a fetch and flag. We could possibly merge this result back in later.
+ // Fetch the about-to-be mutated result.
WorkingSetCommon::fetchAndInvalidateLoc(txn, member, _collection);
- _ws->flagForReview(valueIt->id);
++_specificStats.forcedFetches;
}
}
- // If we see DL again it is not the same record as it once was so we still want to
- // return it.
- if (_dedup) {
+ // If we see the deleted RecordId again it is not the same record as it once was so we still
+ // want to return it.
+ if (_dedup && INVALIDATION_DELETION == type) {
_seen.erase(dl);
}
}