[Xapian-discuss] multiple database update scripts

Jim Spath jspath at pangeamedia.com
Tue Mar 17 15:19:34 GMT 2009


Hi,

We recently split the updating of a Xapian database into two separate 
processes.

Process A selects items which need reindexing, writes a datafile, and 
runs scriptindex against this file to update the database.

Process B gatherers some useful meta for all items and updates each 
item's data in the Xapian database using Search::Xapian.

When process B is running and process A tries to run, scriptindex spits 
out many of these:

Database locked ... retrying
Database locked ... retrying
Database locked ... retrying

And each time it does so, a zombie process is spawned.  Left unchecked, 
this can spawn hundreds of processes.  Is this the expected behavior for 
scriptindex when it can't get a database lock?

My main question is if its possible to have two processes trying to 
update the Xapian database at the same time?

Thanks!
- Jim



More information about the Xapian-discuss mailing list