Re: [PATCH] test: change database from within pre-new hook

Subject: Re: [PATCH] test: change database from within pre-new hook

Date: Tue, 11 May 2021 19:34:33 -0300

To: Michael J Gruber, notmuch@notmuchmail.org

Cc:

From: David Bremner


Michael J Gruber <git@grubix.eu> writes:

> Due to the change in the config system, notmuch keeps a notmuch database
> open when it would not do so before. Consequently, it can miss changes
> to the database which are done from a hook (while notmuch holds the
> databse in read only mode). When notmuch itself writes to the database
> after that it uses wrong assumptions about the last used doc id etc.
>
> Demonstrate this by triggering an assertion. (This new test succeeds
> with notmuch 0.31.4.)
>
> Signed-off-by: Michael J Gruber <git@grubix.eu>
> ---
>  test/T400-hooks.sh | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)

> +    notmuch search '*' > change.expected

That line looks like leftover debugging to me, so I deleted
it. Otherwise it works fine, thanks for tracking down the bug and
providing a test.

d

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

Thread: