From 025831e760718631c6c8a55563d4c1139ac5c45b Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 02 Aug 2010 17:56:28 +0000 Subject: sl#2132: reduce _FLUSH_TIMEOUT to 5 seconds 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. --- diff --git a/src/carquinyol/indexstore.py b/src/carquinyol/indexstore.py index e36f9a7..62b843b 100644 --- a/src/carquinyol/indexstore.py +++ b/src/carquinyol/indexstore.py @@ -41,7 +41,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'] -- cgit v0.9.1