summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/and_hash.cpp
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2015-08-27 19:21:53 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2015-08-27 19:21:53 -0400
commit022cc024da1e4ff5664742befed0059c1ddfa255 (patch)
treed945500195a5f1f032ac7deb1dbb9119809ca3ed /src/mongo/db/exec/and_hash.cpp
parent4ac0bfb55d9cccbc6784ded607eae14312ec9bcc (diff)
downloadmongo-022cc024da1e4ff5664742befed0059c1ddfa255.tar.gz
SERVER-16444 Only make BSONObj underlying WSM owned if not mmapv1.
Resolves the performance regression with mmapv1 introduced by 764e0c4 where documents were being copied in PlanStages that perform invalidations. Partially reverted changes to DeleteStage and UpdateStage because the document to return is not guaranteed to be owned after makeObjOwnedIfNeeded() is called when running with mmapv1.
Diffstat (limited to 'src/mongo/db/exec/and_hash.cpp')
-rw-r--r--src/mongo/db/exec/and_hash.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/exec/and_hash.cpp b/src/mongo/db/exec/and_hash.cpp
index e272c54b17e..4518802afba 100644
--- a/src/mongo/db/exec/and_hash.cpp
+++ b/src/mongo/db/exec/and_hash.cpp
@@ -147,7 +147,7 @@ PlanStage::StageState AndHashStage::work(WorkingSetID* out) {
} else if (PlanStage::ADVANCED == childStatus) {
// Ensure that the BSONObj underlying the WorkingSetMember is owned in case we
// yield.
- _ws->get(_lookAheadResults[i])->makeObjOwned();
+ _ws->get(_lookAheadResults[i])->makeObjOwnedIfNeeded();
break; // Stop looking at this child.
} else if (PlanStage::FAILURE == childStatus || PlanStage::DEAD == childStatus) {
// Propage error to parent.
@@ -286,7 +286,7 @@ PlanStage::StageState AndHashStage::readFirstChild(WorkingSetID* out) {
}
// Ensure that the BSONObj underlying the WorkingSetMember is owned in case we yield.
- member->makeObjOwned();
+ member->makeObjOwnedIfNeeded();
// Update memory stats.
_memUsage += member->getMemUsage();