From 3495d153b317a0853abd7114f29b44517f7c3813 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 13 Jan 2004 13:37:25 +0000 Subject: * Periodically checkpoint the log. --- src/libstore/db.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libstore') diff --git a/src/libstore/db.cc b/src/libstore/db.cc index 057371ef5..c89d6b197 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); } -- cgit v1.2.3