about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-01-13T13·37+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-01-13T13·37+0000
commit3495d153b317a0853abd7114f29b44517f7c3813 (patch)
tree3385195e831313f57e843e7c7fe164528d4bd259 /src
parent698e880c9f03b3aaade13897de3498a5915ea8fd (diff)
* Periodically checkpoint the log.
Diffstat (limited to 'src')
-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 057371ef50b5..c89d6b197d7c 100644
--- a/src/libstore/db.cc
+++ b/src/libstore/db.cc
@@ -261,7 +261,9 @@ void Database::close()
             delete db;
         }
 
-//         env->txn_checkpoint(0, 0, 0);
+        /* Do a checkpoint every 128 kilobytes, or every 5 minutes. */
+        env->txn_checkpoint(128, 5, 0);
+        
         env->close(0);
 
     } catch (DbException e) { rethrow(e); }