Skip to content

Commit

Permalink
Continue holding lock while finding error location SERVER-5101
Browse files Browse the repository at this point in the history
This has no impact on the normal case since we return anyway. Current
test fails are indicating that the problem was written with
writeNoJournal, but that looks correct. This should confirm or rule that
out.
  • Loading branch information
RedBeard0531 committed Mar 1, 2012
1 parent 40365f6 commit 2e4f020
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/mongo/db/dur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,10 @@ namespace mongo {
_bytes += mmf->length();

assert( mmf->length() == (unsigned) mmf->length() );
{
scoped_lock lk( privateViews._mutex() ); // see setNoJournal
if (memcmp(p, w, (unsigned) mmf->length()) == 0)
return; // next file
}

scoped_lock lk( privateViews._mutex() ); // see setNoJournal
if (memcmp(p, w, (unsigned) mmf->length()) == 0)
return; // next file

unsigned low = 0xffffffff;
unsigned high = 0;
Expand Down

0 comments on commit 2e4f020

Please sign in to comment.