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

Tomeu Vizoso tomeu at sugarlabs.org
Mon Sep 27 10:09:49 EDT 2010


On Fri, Sep 24, 2010 at 19:22, Sascha Silbe
<sascha-ml-reply-to-2010-3 at silbe.org> wrote:
> 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__
>    self._index_store.open_index()
>  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__
>    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
> 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].

Have just added a comment that hopefully will make easier to see what
needs to be done.

> 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.

That's a good point, now I understand why we cannot rely on the usual
D-Bus mechanisms.

Regards,

Tomeu

> Sascha
>
> [1] https://bugs.sugarlabs.org/ticket/1257
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


More information about the Sugar-devel mailing list