Error while compacting: Bad position key

Mike Hommey mh at glandium.org
Mon Jul 9 20:16:28 PDT 2018


Hi,

When running `notmuch compact` today, it stopped with the following
output:

Compacting database...
compacting table postlist
     Reduced by 25% 648656K (2498904K -> 1850248K)
compacting table docdata
     Reduced by 15% 24K (152K -> 128K)
compacting table termlist
     Reduced by 1% 27008K (2211800K -> 2184792K)
compacting table position
Error while compacting: Bad position key

Compaction failed: A Xapian exception occurred

Running xapian-check says:

docdata:
blocksize=8K items=2677 firstunused=19 revision=15425 levels=1 root=17
B-tree checked okay
docdata table structure checked OK

termlist:
blocksize=8K items=2986940 firstunused=276475 revision=15425 levels=2 root=271786
B-tree checked okay
doclen not within bounds
(...)
doclen not within bounds
termlist table errors found: 107982

postlist:
blocksize=8K items=16090818 firstunused=312363 revision=15425 levels=3 root=249894
B-tree checked okay
postlist table structure checked OK

position:
blocksize=8K items=236476398 firstunused=653990 revision=15425 levels=3 root=598684
xapian-check: DatabaseError: Block 459158 item 179: not in sorted order


Is there something I can do, or do I essentially need to completely
rebuild the database (and if so, what's the best way to do it?)

Cheers,

Mike


More information about the notmuch mailing list