unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: James Westby <jw+debian@jameswestby.net>, notmuch@notmuchmail.org
Subject: Re: Missing messages breaking threads
Date: Fri, 18 Dec 2009 11:41:18 -0800	[thread overview]
Message-ID: <874onoysrl.fsf@yoom.home.cworth.org> (raw)
In-Reply-To: <87oclwrtqa.fsf@jameswestby.net>

[-- Attachment #1: Type: text/plain, Size: 2670 bytes --]

On Fri, 18 Dec 2009 19:02:21 +0000, James Westby <jw+debian@jameswestby.net> wrote:
> I like the architecture of notmuch, and have just switched
> to using it as my primary client, so thanks.

You're quite welcome, James. Welcome to notmuch!

> Therefore I'd like to fix this. The obvious way is to
> introduce documents in to the db for each id we see, and
> threading should then naturally work better.

That sounds like a fine idea.

> The only issue I see with doing this is with mail delays.
> Once we do this we will sometimes receive a message that
> already has a dummy document. What happens currently with
> message-id collisions?

The current message-ID collision logic is pretty brain-dead. It just
says "Oh, I've seen a file with this message before, so I'll skip this
additional file".

But I'm just putting the finishing touches on a patch that instead does:

	Oh, and here's an additional filename for that message ID. Add
	that too, please.

Beyond that, all we would need to do as well is to also index the new
content. I don't want to do useless re-indexing when files just get
renamed. So maybe all we need to do is to save the filesize of the
last-indexed file for a document and then when we encounter a file with
the same message ID and a larger file size, then index it as well?

That would even take care of providing the opportunity to index
additional mailing-list-added content for messages also sent directly
via CC.

The file-size heuristic wouldn't be perfect for these other cases. I
guess we save a list of sha-1 sums for indexed files or so, (assuming
that's cheaper than just re-indexing---before the Xapian Defect 250 fix
I'm sure it is, but after I'm not sure---we maybe should just always
re-index---but I think I have seen the TermGenerator appear in profiles
of indexing runs.)

>   * When we get a message-id conflict check for dummy:True
>     and replace the document if it is there.
> 
> How does this sound?

That sounds fine. It's the same as what I propose above with
"filesize:0" instead of "dummy:true".

> There could be an issue with synthesising too many threads
> and then ending up having to try and put a message in two
> threads? I see there is code for merging threads, would that
> handle this?

It should, yes.

The current logic is that a message can only appear in a single
thread. So if a message has children or parents with distinct thread IDs
then those threads are merged.

I can imagine some strange cross-posting scenario where one could argue
that the merging shouldn't happen, but I'm not sure we want to try to
respect that.

-Carl

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2009-12-18 19:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 19:02 Missing messages breaking threads James Westby
2009-12-18 19:41 ` Carl Worth [this message]
2009-12-18 19:53   ` James Westby
2009-12-18 20:52     ` Carl Worth
2009-12-18 21:24       ` James Westby
2009-12-22 22:48       ` Olly Betts
2009-12-23  0:05         ` Carl Worth
2010-03-13 21:27           ` [PATCH] Store thread ids for messages that we haven't seen yet James Westby
2010-04-13 15:20             ` Carl Worth
2010-04-13 15:36               ` James Westby
2010-04-15  0:39                 ` Carl Worth
2009-12-18 21:21     ` [PATCH] Store the size of the file for each message James Westby
2009-12-18 22:29       ` Carl Worth
2009-12-19  0:08         ` James Westby
2009-12-19  0:57           ` Carl Worth
2009-12-19  1:35             ` James Westby
2009-12-19  5:24               ` Carl Worth
2009-12-19  8:02                 ` Marten Veldthuis
2009-12-19 17:17                   ` Carl Worth
2009-12-19 13:12                 ` [PATCH] Add ENVIRONMENT VARIABLES section to the man page James Westby
2010-02-23 19:25                   ` Carl Worth
2009-12-19  0:11         ` [PATCH v2] Store the size of the file for each message James Westby
2009-12-19  1:29         ` [PATCH] Reindex larger files that duplicate ids we have James Westby
2009-12-21 18:33           ` Carl Worth
2009-12-20 20:27         ` [PATCH] Store documents for message-ids we haven't seen James Westby
2009-12-21 18:43           ` Carl Worth

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=874onoysrl.fsf@yoom.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=jw+debian@jameswestby.net \
    --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).