On Fri, Feb 11, 2005 at 02:33:22PM -0500, Mike Boone
wrote:> I am getting this error when trying to remove a document from my Xapian
> database via writabledatabase_delete_document:
>
> "DatabaseCorruptError: Db block overwritten - are there multiple
writers?"
>
> There might have been two processes trying to write to it earlier today,
but
> currently only one process can touch it at a time, and I still receive the
> error.
The error message isn't precisely phrased - once you've run concurrent
writers, you'll probably have put the database into an internally
inconsistent state such that future updates can fail with this error.
> Is there a fast way to fix this problem or do I need to rebuild the whole
> Xapian database?
Rebuilding is simplest and safest. If you can work out exactly what
damage was done, you might be able to avoid a rebuild, but it's a lot
of work and there aren't really existing tools to do this.
You could try using copydatabase to copy the database. If the only
corruption is in the postlist table, this would probably fix it,
although you'd have to inspect the database to see exactly which of the
most recent updates were actually applied.
Cheers,
Olly