[Xapian-discuss] Failure trying to update document.

Jesper Krogh jesper at krogh.cc
Mon Feb 1 05:23:47 GMT 2010


Olly Betts wrote:
> On Sun, Jan 31, 2010 at 08:00:02PM +0100, Jesper Krogh wrote:
>> Jesper Krogh wrote:
>>> Which is kind of odd, it matches the documents terms gets the docid but
>>> fails to get the termslist?
> 
> The postlist is used to find the documents matching particular terms.  The
> termlist holds the reverse mapping - for each document, it stores the list
> of terms which index it.
> 
>> $ xapian-check termlist.DB
>> baseA blocksize=8K items=2980957 lastblock=2357252 revision=2452
>> levels=3 root=108
>> B-tree error 90
>> xapian-check: btree error
>>
>> Can I somehow "fix" it?
> 
> The error here is that the keys in the Btree don't satisfy an expected
> invariant, so it's hard to know quite how corrupted things are.
> 
> If you have the original data, rebuilding is the simplest and safest
> option.
> 
> You may be able to use copydatabase to generate a good copy.  If the
> issue is just a missing termlist entry for one (or several) documents,
> that would skip those, but if things are more messed up it may fail.

I tried to run xapian-compact over night. It has processed the termlist
now and xapian-check is ok on it. Now I'm just waiting for the
position.DB to finish.

> If there's a full set of baseB files, you could try moving *.baseA to
> a temporary directory and see if the database passes xapian-check.  This
> will roll back to the previous committed revision.
> 
> Any idea what might have happened?  I've not heard of corruption like
> this before.

No, the only thing I can come up with is basically that we occationally
do "kill" the indexing process while writing to the index. But it should
be able to handle that (and has done for over 18 months by now).


-- 
Jesper



More information about the Xapian-discuss mailing list