diff options
author | Dwight <dmerriman@gmail.com> | 2009-02-04 11:26:59 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-02-04 11:26:59 -0500 |
commit | 57af77dccf1399524876d3f6e98fb838255534c7 (patch) | |
tree | 1fc5b34c38cc2b2d1f5081205bc6a56349aac9c8 /db/storage.cpp | |
parent | c01b4a773a45d7b7562db2334218cd64944b7396 (diff) | |
parent | 88daf0c1c83ed4ffa249deeb52b411d7997f9f4c (diff) | |
download | mongo-57af77dccf1399524876d3f6e98fb838255534c7.tar.gz |
Merge branch 'master' of git.10gen.com:/data/gitroot/p
Diffstat (limited to 'db/storage.cpp')
-rw-r--r-- | db/storage.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/db/storage.cpp b/db/storage.cpp index 8793f7b6090..da4901ea242 100644 --- a/db/storage.cpp +++ b/db/storage.cpp @@ -21,8 +21,9 @@ static void storeThread() { }
}
+// Currently only called on program exit. void recCacheCloseAll() {
- BasicCached_RecStore::rc.writeDirty();
+ BasicCached_RecStore::rc.writeDirty( true );
RecCache::tempStore.flush();
}
@@ -73,7 +74,7 @@ inline void RecCache::writeIfDirty(Node *n) { }
/* note that this is written in order, as much as possible, given that dirtyl is of type set. */
-void RecCache::writeDirty() {
+void RecCache::writeDirty( bool rawLog ) {
try {
for( set<DiskLoc>::iterator i = dirtyl.begin(); i != dirtyl.end(); i++ ) {
map<DiskLoc, Node*>::iterator j = m.find(*i);
@@ -82,7 +83,11 @@ void RecCache::writeDirty() { }
}
catch(...) {
- log() << "Problem: bad() in RecCache::writeDirty, file io error\n";
+ const char *message = "Problem: bad() in RecCache::writeDirty, file io error\n"; + if ( rawLog ) + rawOut( message ); + else + ( log() << message ).flush(); }
dirtyl.clear();
}
|