unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Michael J Gruber <git@grubix.eu>, notmuch@notmuchmail.org
Subject: Re: [PATCH] test: add known broken test for duplicate thread-id terms
Date: Mon, 17 May 2021 07:02:00 -0300	[thread overview]
Message-ID: <87eee5znjb.fsf@tethera.net> (raw)
In-Reply-To: <162124403391.5529.16910640491826871516.git@grubix.eu>

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

> David Bremner venit, vidit, dixit 2021-05-15 15:05:07:
>> According to my bijection, this bug has been present since commit
>> 411675a6ce in 2017. It is apparently harmless for regular use, but
>> does make notmuch crash when compiled with -DDEBUG_DATABASE_SANITY.
>
> If a message "belongs" to 2 threads, doesn't it mean that it "belongs"
> to at least 1 that it doesn't really belong to?

Sure, conceptually a message should belong to only one thread. But it
isn't clear what having an extra thread-id attached to a message really
means. As far as I can tell, _notmuch_message_get_term will just always
choose the lexicographically first (i.e. minimum) term.

> The recent problem with "db update in pre-new hook" surfaced as extra
> thread assignments for the wrong messages (making them show up the wrong
> thread, too).

To the best of my knowledge, this was caused by something else, namely
the in-memory view of last thread-id being out of sync with the database.

> I meanwhile noticed that they are more common, but am wondering whether
> they are really harmless?

It's possible that I missed some harmful effect. Anton reminded me on
IRC of some previous issues with threading that could conceivably be
related. I guess it would be more precise to say "Duplicate thread-id
terms have not been demonstrated to cause problems in regular use". I
mean, they're obviously a bug.

  reply	other threads:[~2021-05-17 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 13:05 [PATCH] test: add known broken test for duplicate thread-id terms David Bremner
2021-05-15 18:40 ` [PATCH] lib/n_d_index_file: re-use thread-id of existing message David Bremner
2021-05-17  7:12 ` [PATCH] test: add known broken test for duplicate thread-id terms Tomi Ollila
2021-05-17  9:33 ` Michael J Gruber
2021-05-17 10:02   ` David Bremner [this message]
2021-05-22 12:40 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eee5znjb.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=git@grubix.eu \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).