Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-08-02 17:56:28 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2010-08-02 18:07:43 (GMT)
commit025831e760718631c6c8a55563d4c1139ac5c45b (patch)
treea813f4e8f4772e565b977017b2068a7905b87db8
parent7faf55c9466b13c2e16f6242373a6e9bf5a27f8e (diff)
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.
-rw-r--r--src/carquinyol/indexstore.py2
1 files changed, 1 insertions, 1 deletions
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']