sebbacon/alaveteli — Issue #304: Race condition in compact-xapian-database can cause database to disappear
Author: sebbacon
Created: 2011-12-09 10:46:37+00:00
State: open
Labels: high

If the update-xapian-index cron job runs at exactly the wrong time viz. the compact-xapian-database cron job, it is possible for the compacted database to be moved to the wrong place on the filesystem, with the effect that the xapian index is emptied.

The fix is to cause both update-xapian-index and compact-xapian-database to use the same lockfile in the crontab, so that they run exclusively.