about summary refs log tree commit diff
path: root/src/libstore/db.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-12-06T15·00+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-12-06T15·00+0000
commit760264bffe7f233f7c1fd5e9fccb9b3c189afd58 (patch)
tree04907d8b3687a0ca58c4f8dffb598ff7414e4736 /src/libstore/db.cc
parentdc528128cc5230c9eb7da0abb0a791f94e0e3b56 (diff)
* Require Berkeley DB 4.4.
* Checkpoint after an upgrade.

Diffstat (limited to 'src/libstore/db.cc')
-rw-r--r--src/libstore/db.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/db.cc b/src/libstore/db.cc
index a0b1c16cd83a..2c925134aa93 100644
--- a/src/libstore/db.cc
+++ b/src/libstore/db.cc
@@ -306,11 +306,13 @@ void Database::open(const string & path)
 
             /* Try again. */
             open2(path, false);
+
+            /* Force a checkpoint, as per the BDB docs. */
+            env->txn_checkpoint(DB_FORCE, 0, 0);
         }
         else
             rethrow(e);
     }
-    
 }