Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-08-02 18:38:44 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-08-02 18:38:44 (GMT)
commit2241d51c8a02a79e9d7a4f3a295e0b825877d44c (patch)
treebce4bca15ea348ab832ce524ca3712466f334c6d /rpms
parent535b376a3fb95daeb4f12edf82ca6b965b8fe251 (diff)
sugar-datastore: attempt to fix sl#2132
Diffstat (limited to 'rpms')
-rw-r--r--rpms/sugar-datastore/sl2132-reduce-_FLUSH_TIMEOUT-to-5sec.patch33
-rw-r--r--rpms/sugar-datastore/sugar-datastore.spec4
2 files changed, 36 insertions, 1 deletions
diff --git a/rpms/sugar-datastore/sl2132-reduce-_FLUSH_TIMEOUT-to-5sec.patch b/rpms/sugar-datastore/sl2132-reduce-_FLUSH_TIMEOUT-to-5sec.patch
new file mode 100644
index 0000000..b32d8dc
--- /dev/null
+++ b/rpms/sugar-datastore/sl2132-reduce-_FLUSH_TIMEOUT-to-5sec.patch
@@ -0,0 +1,33 @@
+From 502e89cbaa313f9c03fb3908711efbe9a3a06404 Mon Sep 17 00:00:00 2001
+From: Bernie Innocenti <bernie@codewiz.org>
+Date: Mon, 2 Aug 2010 13:33:43 -0400
+Subject: [PATCH] sl#2132: reduce _FLUSH_TIMEOUT to 5 seconds
+Organization: Sugar Labs Foundation
+X-Subversion: sucks
+
+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
+
diff --git a/rpms/sugar-datastore/sugar-datastore.spec b/rpms/sugar-datastore/sugar-datastore.spec
index a18b4dc..7c509f1 100644
--- a/rpms/sugar-datastore/sugar-datastore.spec
+++ b/rpms/sugar-datastore/sugar-datastore.spec
@@ -2,7 +2,7 @@
Name: sugar-datastore
Version: 0.88.0
-Release: 3.3dxo%{?dist}
+Release: 3.4dxo%{?dist}
#Release: 2.%{alphatag}%{?dist}
Summary: Sugar Datastore
@@ -13,6 +13,7 @@ Source0: http://download.sugarlabs.org/sources/sucrose/glucose/%{name}/%{name}-%
# Bug fixes
Patch1: sl2095-invert-datastore-clean-logic.patch
+Patch2: sl2132-reduce-_FLUSH_TIMEOUT-to-5sec.patch
# aa's "sort by filesize" patch series
#Patch0: sizelist-0000-cover-letter.patch
@@ -42,6 +43,7 @@ may become unavailable at times
%prep
%setup -q
%patch1 -p1
+%patch2 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1