[Dextrose] Datastore index corruption!
Bernie Innocenti
bernie at codewiz.org
Wed Jul 28 19:21:12 EDT 2010
(also filed as http://bugs.sugarlabs.org/ticket/2132, but let's keep the
discussion on the mailing-list, please).
Today we figured out one of the possibly many ways in which the index of
the datastore can get corrupted in Sugar.
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.
Step 5 is just an artificial way to reproduce the problem. Other equally
effective ways to trigger this data loss issue in the real-world include
running out of battery, holding the power button for 4 seconds, and
triggering the kernel out-of-memory killer.
I'm sure the datastore could definitely work harder to prevent this type
of data loss, by flushing the index immediately after an activity
creates a new entry.
Meanwhile, we're working on a work-around that will hopefully fix all
problems of this sort: a "Rescan" or "Reindex" item on the Journal
palette.
I can already hear a big objection coming: this sort of geeky stuff has
no place in the Sugar UI. True, but I see no alternative until we'll
have a 100% reliable datastore that can fix itself in all cases of
corruption.
--
// Bernie Innocenti - http://codewiz.org/
\X/ Sugar Labs - http://sugarlabs.org/
More information about the Dextrose
mailing list