Re: Internal error: Message without type term

Subject: Re: Internal error: Message without type term

Date: Tue, 4 Jul 2023 01:20:07 +0100

To: David Bremner

Cc: Peter P., notmuch@notmuchmail.org, xapian-discuss@lists.xapian.org

From: Olly Betts


On Mon, Jul 03, 2023 at 02:26:03PM +0200, David Bremner wrote:
> "Peter P." <peterparker@fastmail.com> writes:
> 
> > I ran xapian-check on ~/.notmuch/xapian and include its messages
> > below at the end of this mail. Everyone please forgive me for
> > pasting 1121 there. :)
> 
> H'mm. It doesn't look familiar to me, but I will check with xapian
> experts to see if the failure mode is known/fixable. I'd guess probably
> not fixable.

Currently we don't have a database fixing tool for glass databases (the
"fix" mode in xapian-check can recreate base files for the older chert
database format, but glass doesn't have these base files which
eradicated the failure mode of them sometimes getting truncated to zero
size on power failure or OS crash).

Some of the problems reported have an obvious fix, but we don't have
existing code to fix them, and some look like they are probably due to
data being overwritten so fixing everything to be consistent probably
wouldn't actually give a database that entirely matches your email
anyway.

Was this database originally created by Xapian < 1.4.22?  It looks
like it could be the result of the bug fixed in 1.4.22 with handling
commit() failure on disk full.

> >> 2)  Move the database out of the way, re-run notmuch new,
> >> and restore your state using "notmuch restore < notmuch-db.txt"
> >  
> > I'd be fine regenerating the entire database without a backup dump even,
> > I don't think there is anything in there that can't be regernerated,
> > no?
> 
> The main thing that would be lost is tags that are not synched to
> maildir flags. In the "standard" workflow "inbox" is such a tag.

If there's tag data in the database which isn't backed up or synced to
maildir flags, you may be able to rescue it using:

https://git.xapian.org/?p=xapian;a=blob;f=README.notmuch;hb=refs/heads/notmuch-tag-rescue-hack

This creates a file with the tag data in the format `notmuch restore`
expects.  I'd expect this would work for your database as the termlist
table is mostly OK.

Cheers,
    Olly
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: