[Sugar-devel] Unintentional data store reindexing on sugar-emulator restart (was: Re: Some questions concerning saving methods on sugar)

Sascha Silbe sascha-ml-reply-to-2010-3 at silbe.org
Fri Sep 24 13:22:54 EDT 2010

Excerpts from Tomeu Vizoso's message of Fri Sep 24 15:10:07 +0200 2010:

> > It could be that the Journal is reindexing. (For a large Journal, this
> > sometimes has the appearance of an empty or nearly empty Journal.) If
> > you wait for the indexing to complete, everything reappears as normal.
> But why would it be reindexing? Are people getting their journals
> reindexed from time to time?

This happened to me a few times during the last few days, each time
after I restarted Sugar rather quickly. There's an exception in the log:

1285265788.580216 DEBUG root: max_versions=0
1285265788.604839 ERROR root: Failed to open index, will rebuild
Traceback (most recent call last):
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.6/site-packages/carquinyol/datastore.py", line 275, in __init__
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.6/site-packages/carquinyol/indexstore.py", line 246, in open_index
    self._database = WritableDatabase(index_path, xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.6/dist-packages/xapian/__init__.py", line 4059, in __init__
DatabaseLockError: Unable to get write lock on /home/sascha.silbe/.sugar/default/datastore/index: already locked
1285265789.971570 DEBUG root: Going to update the index with object_ids [('15947ca6-a018-47d0-9c09-f58c12e6cf82'

My guess is that the old sugar-datastore instance still has the index
open. We don't have API for stopping sugar-datastore and instead rely
on dbus-daemon to stop it when it gets stopped itself. I've noticed that
when using --exit-with-session dbus-launch and dbus-daemon often continue
to run for several seconds after a session has ended and returned.

So this is just another way to trigger SL#1257 [1].

It might be even easier to trigger if you're running sugar-emulator from
a GUI menu on a slow system as the user assumes it to be finished as
soon as the Xephyr window is closed, not when sugar-emulator (the
script) stops.


[1] https://bugs.sugarlabs.org/ticket/1257
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100924/c8659cd7/attachment.pgp 

More information about the Sugar-devel mailing list