Skip to content

Commit

Permalink
putting all PageFaultException lap logic in 1 place (Client::allowedT…
Browse files Browse the repository at this point in the history
…oThrowPageFaultException)
  • Loading branch information
erh committed Apr 2, 2012
1 parent 2a5a7f9 commit 93a0a78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/mongo/db/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ namespace mongo {
return
_hasWrittenThisPass == false &&
_pageFaultRetryableSection != 0 &&
_pageFaultRetryableSection->laps() < 1000;
_pageFaultRetryableSection->laps() < 100;
}

void OpDebug::reset() {
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/pagefault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace mongo {
cc().getPageFaultRetryableSection()->didLap();
r = _r;
era = LockMongoFilesShared::getEra();
log(2) << "PageFaultException thrown" << endl;
LOG(2) << "PageFaultException thrown" << endl;
}

void PageFaultException::touch() {
Expand Down
7 changes: 1 addition & 6 deletions src/mongo/db/record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,7 @@ namespace mongo {

void Record::_accessing() const {
if ( cc().allowedToThrowPageFaultException() && ! likelyInPhysicalMemory() ) {
if( cc().getPageFaultRetryableSection()->laps() > 100 ) {
log() << "info pagefaultexception _laps > 100" << endl;
}
else {
throw PageFaultException(this);
}
throw PageFaultException(this);
}
}

Expand Down

0 comments on commit 93a0a78

Please sign in to comment.