about summary refs log tree commit diff
path: root/src/libstore/db.cc
diff options
context:
space:
mode:
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 a0b1c16cd8..2c925134aa 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);
     }
-    
 }