Dont error out due to lockfile when running with --repair SERVER-1609

This commit is contained in:
Mathias Stearn
2011-04-04 17:32:49 -04:00
parent 72ee3c3ef7
commit e73c3aac9d
3 changed files with 5 additions and 5 deletions

View File

@@ -850,7 +850,7 @@ namespace mongo {
#endif
}
void acquirePathLock() {
void acquirePathLock(bool doingRepair) {
string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
bool oldFile = false;
@@ -916,7 +916,7 @@ namespace mongo {
}
}
else {
if (!dur::haveJournalFiles()) {
if (!dur::haveJournalFiles() && !doingRepair) {
errmsg = str::stream()
<< "************** \n"
<< "old lock file: " << name << ". probably means unclean shutdown\n"
@@ -959,7 +959,7 @@ namespace mongo {
#endif
}
#else
void acquirePathLock() {
void acquirePathLock(bool) {
// TODO - this is very bad that the code above not running here.
// Not related to lock file, but this is where we handle unclean shutdown