A systematic way of handling Xapian lock errors?