diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-02-03 16:18:08 -0500 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-02-05 14:43:37 -0500 |
commit | 2c360253ba289c293ccfcacbf010a2c79b12ef0a (patch) | |
tree | 849cc8e1553df6b43ae775611d1fc45e8a846af1 /src/mongo/db/exec/and_hash.cpp | |
parent | 4c8be4e74705ca78a52d6bdbd4f290e10014d2a1 (diff) | |
download | mongo-2c360253ba289c293ccfcacbf010a2c79b12ef0a.tar.gz |
SERVER-18826 Rename WorkingSet State Names from LOC to RID
Also renamed:
* WorkingSetMember::hasLoc() -> WorkingSetMember::hasRecordId
* WorkingSetMember::loc -> WorkingSetMember::recordId
Diffstat (limited to 'src/mongo/db/exec/and_hash.cpp')
-rw-r--r-- | src/mongo/db/exec/and_hash.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mongo/db/exec/and_hash.cpp b/src/mongo/db/exec/and_hash.cpp index 8153359ce89..a9bcb8466f2 100644 --- a/src/mongo/db/exec/and_hash.cpp +++ b/src/mongo/db/exec/and_hash.cpp @@ -219,12 +219,12 @@ PlanStage::StageState AndHashStage::doWork(WorkingSetID* out) { // Maybe the child had an invalidation. We intersect RecordId(s) so we can't do anything // with this WSM. - if (!member->hasLoc()) { + if (!member->hasRecordId()) { _ws->flagForReview(*out); return PlanStage::NEED_TIME; } - DataMap::iterator it = _dataMap.find(member->loc); + DataMap::iterator it = _dataMap.find(member->recordId); if (_dataMap.end() == it) { // Child's output wasn't in every previous child. Throw it out. _ws->free(*out); @@ -264,13 +264,13 @@ PlanStage::StageState AndHashStage::readFirstChild(WorkingSetID* out) { // Maybe the child had an invalidation. We intersect RecordId(s) so we can't do anything // with this WSM. - if (!member->hasLoc()) { + if (!member->hasRecordId()) { _ws->flagForReview(id); return PlanStage::NEED_TIME; } - if (!_dataMap.insert(std::make_pair(member->loc, id)).second) { - // Didn't insert because we already had this loc inside the map. This should only + if (!_dataMap.insert(std::make_pair(member->recordId, id)).second) { + // Didn't insert because we already had this RecordId inside the map. This should only // happen if we're seeing a newer copy of the same doc in a more recent snapshot. // Throw out the newer copy of the doc. _ws->free(id); @@ -329,18 +329,18 @@ PlanStage::StageState AndHashStage::hashOtherChildren(WorkingSetID* out) { // Maybe the child had an invalidation. We intersect RecordId(s) so we can't do anything // with this WSM. - if (!member->hasLoc()) { + if (!member->hasRecordId()) { _ws->flagForReview(id); return PlanStage::NEED_TIME; } - verify(member->hasLoc()); - if (_dataMap.end() == _dataMap.find(member->loc)) { + verify(member->hasRecordId()); + if (_dataMap.end() == _dataMap.find(member->recordId)) { // Ignore. It's not in any previous child. } else { // We have a hit. Copy data into the WSM we already have. - _seenMap.insert(member->loc); - WorkingSetID olderMemberID = _dataMap[member->loc]; + _seenMap.insert(member->recordId); + WorkingSetID olderMemberID = _dataMap[member->recordId]; WorkingSetMember* olderMember = _ws->get(olderMemberID); size_t memUsageBefore = olderMember->getMemUsage(); @@ -423,8 +423,8 @@ void AndHashStage::doInvalidate(OperationContext* txn, const RecordId& dl, Inval for (size_t i = 0; i < _lookAheadResults.size(); ++i) { if (WorkingSet::INVALID_ID != _lookAheadResults[i]) { WorkingSetMember* member = _ws->get(_lookAheadResults[i]); - if (member->hasLoc() && member->loc == dl) { - WorkingSetCommon::fetchAndInvalidateLoc(txn, member, _collection); + if (member->hasRecordId() && member->recordId == dl) { + WorkingSetCommon::fetchAndInvalidateRecordId(txn, member, _collection); _ws->flagForReview(_lookAheadResults[i]); _lookAheadResults[i] = WorkingSet::INVALID_ID; } @@ -441,7 +441,7 @@ void AndHashStage::doInvalidate(OperationContext* txn, const RecordId& dl, Inval if (_dataMap.end() != it) { WorkingSetID id = it->second; WorkingSetMember* member = _ws->get(id); - verify(member->loc == dl); + verify(member->recordId == dl); if (_hashingChildren) { ++_specificStats.flaggedInProgress; @@ -452,8 +452,8 @@ void AndHashStage::doInvalidate(OperationContext* txn, const RecordId& dl, Inval // Update memory stats. _memUsage -= member->getMemUsage(); - // The loc is about to be invalidated. Fetch it and clear the loc. - WorkingSetCommon::fetchAndInvalidateLoc(txn, member, _collection); + // The RecordId is about to be invalidated. Fetch it and clear the RecordId. + WorkingSetCommon::fetchAndInvalidateRecordId(txn, member, _collection); // Add the WSID to the to-be-reviewed list in the WS. _ws->flagForReview(id); |