Subject: [PATCH] sl#2132: reduce _FLUSH_TIMEOUT to 5 seconds

From: Bernie Innocenti <[email-masked]>
Date: Mon, 2 Aug 2010 13:33:43 -0400

This drastically reduces the chance of data loss in the journal on
crash or power failure.

The previous timeout was set to 60 seconds. It is not clear how much
time flushing the journal takes on an XO-1. Until we measure, 5 and 60
are equally unjustified random numbers.
---
 src/carquinyol/indexstore.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/carquinyol/indexstore.py b/src/carquinyol/indexstore.py
index 5ed9a0b..cc7f755 100644
--- a/src/carquinyol/indexstore.py
+++ b/src/carquinyol/indexstore.py
@@ -44,7 +44,7 @@ _PREFIX_KEEP = 'K'
 _FLUSH_THRESHOLD = 20
 
 # Force a flush after _n_ seconds since the last change to the db
-_FLUSH_TIMEOUT = 60
+_FLUSH_TIMEOUT = 5
 
 _PROPERTIES_NOT_TO_INDEX = ['timestamp', 'preview']
 
-- 
1.7.2.1