[Xapian-discuss] Xapian-compact: resulting DB corrupted

Luca Barbieri lucabarb at gmail.com
Mon Oct 26 15:46:58 GMT 2009


Hi, while using xapian-core-1.1.2 with chert database I've found an error.

I try to compact some databases using xapian-compact. The process seems to
work correctly and I don't see any error:

postlist: Reduced by 62.6545% 7704K (12296K -> 4592K)
record: Reduced by 50% 672K (1344K -> 672K)
termlist: Reduced by 46.2309% 7016K (15176K -> 8160K)
position: Size unchanged (0K)
spelling: Size unchanged (0K)
synonym: Size unchanged (0K)

But the resulting database has some problem. I post you the result of the
xapian-check:
---------------
# /xapian/bin/xapian-check compact/

Database couldn't be opened for reading: DatabaseCorruptError: Bad encoded
DB stats (out of data)
Continuing check anyway
record:
baseB blocksize=8K items=56416 lastblock=83 revision=1 levels=1 root=2
B-tree checked okay
record table structure checked OK

termlist:
baseB blocksize=8K items=112832 lastblock=1019 revision=1 levels=2 root=583
B-tree checked okay
termlist table structure checked OK

postlist:
baseB blocksize=8K items=35130 lastblock=573 revision=1 levels=2 root=458
B-tree checked okay
postlist table structure checked OK

position:
Lazily created, and not yet used.

spelling:
Lazily created, and not yet used.

synonym:
Lazily created, and not yet used.

Total errors found: 1
-------------

I immediately run xapian-check on each "raw" database I'm trying to compact,
but everything works fine, no errors.
Just to be sure, I've re-runned the xapian-compact on a different machine,
after rebuilding xapian, with the same "raw" databases. Same error.

The problem occurs randomly, on some sets of "raw" databases xapian-compact
works fine, on other sets I've the same DatabaseCorruptError.
May be this problem content-related? In this scenario, why the "raw"
databases are correct to the xapian-check?

What can I do to discover the problem(s)?

Thank you in advance.
---------------------
Luca Barbieri


More information about the Xapian-discuss mailing list