[Sugar-devel] Datastore index corruption!

Aleksey Lim alsroot at member.fsf.org
Fri Jul 30 03:11:08 EDT 2010


On Thu, Jul 29, 2010 at 05:01:32PM -0400, Bernie Innocenti wrote:
> On Wed, 2010-07-28 at 19:21 -0400, Bernie Innocenti wrote:
> > Here's an almost infallible recipe to reproduce it:
> > 
> > 1. open Write
> > 2. type something
> > 3. close Write
> > 4. wait a few seconds
> > 5. kill -9 the datastore process
> > 6. restart sugar (ctrl-alt-del)
> > 
> > Your saved entry is gone. It still takes up space on disk, but it's no
> > longer visible until you rebuild the index.
> 
> We figured out that the datastore delays writes to disk by about 60
> seconds. This braindead behavior appears to be a *designed*
> optimization!
> 
> Is it in Rarian or in the datastore code itelf? How do we change it to a
> sane 2-3 seconds delay?

imo, initiating ds flush (or regualr ds shutdown), and thus setting update
flag, on power-off button ACPI catch is more appropriate way to handle only
this usecase (we can all time play w/ timeout and don't find proper value
that will be good in all cases).

-- 
Aleksey


More information about the Sugar-devel mailing list