diff options
author | Dwight <dmerriman@gmail.com> | 2010-01-21 13:40:18 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2010-01-21 13:40:18 -0500 |
commit | a5a781593683909e1c3024d7a07212d365282f8e (patch) | |
tree | e52de46b1b49ee106b98fbc88a32c2807d99081b /db/db.cpp | |
parent | 3f09bd4f64827e3491d34f866a2cf3e5325f188f (diff) | |
download | mongo-a5a781593683909e1c3024d7a07212d365282f8e.tar.gz |
inspect NamespaceDetails on load
Diffstat (limited to 'db/db.cpp')
-rw-r--r-- | db/db.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/db/db.cpp b/db/db.cpp index 582f0ddf3e6..851ce11f0d8 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -332,8 +332,14 @@ namespace mongo { return repairDatabase( dbName.c_str(), errmsg ); } + extern bool checkNsFilesOnLoad; + void repairDatabases() { log(1) << "enter repairDatabases" << endl; + + assert(checkNsFilesOnLoad); + checkNsFilesOnLoad = false; // we are mainly just checking the header - don't scan the whole .ns file for every db here. + dblock lk; vector< string > dbNames; getDatabaseNames( dbNames ); @@ -374,6 +380,8 @@ namespace mongo { cc().shutdown(); dbexit( EXIT_CLEAN ); } + + checkNsFilesOnLoad = true; } void clearTmpFiles() { |