Re: [PATCH] lib/notmuch_database_reopen: reload some database metada

Subject: Re: [PATCH] lib/notmuch_database_reopen: reload some database metada

Date: Tue, 11 May 2021 22:17:29 +0200

To: Alexander Adolf, David Bremner, notmuch@notmuchmail.org

Cc:

From: Michael J Gruber


David Bremner venit, vidit, dixit 2021-05-11 19:47:15:
> David Bremner <david@tethera.net> writes:
> 
> > In some uses of reopen, new documents and threads maybe have been
> > added, and e.g. compaction may have changed the uuid.
> 
> It's quite possible there is more cached data that should be discarded,
> but I'll have to think about that a bit more.
> 
> d

Haven't tried your patch yet, but worked on a test which even produces

notmuch: lib/database.cc:1415: unsigned int
_notmuch_database_generate_doc_id(notmuch_database_t*): Assertion
`notmuch->last_doc_id >= notmuch->xapian_db->get_lastdocid ()' failed.

by calling notmuch insert --no-hooks inside the pre-new hook of notmuch
new ... (T400). I have to test with nm 0.31 and nm 0.32+plus patch
before I send this out.

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

Thread: