[Xapian-discuss] Twisted + Xapian WriteableDatabase leaves db_lock file on exit.

jarrod roberson jarrod at vertigrated.com
Wed May 3 18:32:20 BST 2006


On 5/3/06, Olly Betts <olly at survex.com> wrote:
>
> It seems this has cropped up before - see Michael Salib's point "2."
> here:
>
> http://article.gmane.org/gmane.comp.search.xapian.general/1387
>
> I've not yet implemented WritableDatabase::close() though.
>
> Incidentally, the stale lockfile on exit issue goes away if you use
> flint instead of quartz, though the database lock will still be held
> while the process keeps running which could still be a problem.
>
> Cheers,
>     Olly
>

thanks for the hint about using Flint instead.
I thought I was but I guess I didn't add it to my .profile

using Flint it starts and stops and doesn't cause any problems now.

a .close() method on WritableDatabase might be a good addition.
Just so you can force the db closed when you think it might not be being
de-referenced reliably.

It seems to be the same type of issue listed in that link you posted.
Twisted is probably holding on to the Service object
and that is holding on to the db object.

I KNOW I am not sharing db objects nor document objects since it is all
single threaded and all self contained in that one index method.


More information about the Xapian-discuss mailing list