1 Return-Path: <aclements@csail.mit.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 1DCF0431FB6
\r
6 for <notmuch@notmuchmail.org>; Tue, 21 Oct 2014 18:51:09 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id hdepnvN9TTz6 for <notmuch@notmuchmail.org>;
\r
16 Tue, 21 Oct 2014 18:51:01 -0700 (PDT)
\r
17 Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])
\r
18 by olra.theworths.org (Postfix) with ESMTP id A9137431FAE
\r
19 for <notmuch@notmuchmail.org>; Tue, 21 Oct 2014 18:51:01 -0700 (PDT)
\r
20 Received: from [104.131.20.129] (helo=awakeningjr)
\r
21 by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
\r
22 (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)
\r
23 id 1Xgl4n-0005IZ-A2; Tue, 21 Oct 2014 21:51:01 -0400
\r
24 Received: from amthrax by awakeningjr with local (Exim 4.84)
\r
25 (envelope-from <aclements@csail.mit.edu>)
\r
26 id 1Xgl4n-0000IQ-1j; Tue, 21 Oct 2014 21:51:01 -0400
\r
27 Date: Tue, 21 Oct 2014 21:51:01 -0400
\r
28 From: Austin Clements <aclements@csail.mit.edu>
\r
29 To: Mark Walters <markwalters1009@gmail.com>
\r
30 Subject: Re: [PATCH v2 12/12] lib: Remove unnecessary thread linking steps
\r
31 when using ghost messages
\r
32 Message-ID: <20141022015101.GF7970@csail.mit.edu>
\r
33 References: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu>
\r
34 <1412637438-4821-13-git-send-email-aclements@csail.mit.edu>
\r
35 <87wq7thv27.fsf@qmul.ac.uk>
\r
37 Content-Type: text/plain; charset=us-ascii
\r
38 Content-Disposition: inline
\r
39 In-Reply-To: <87wq7thv27.fsf@qmul.ac.uk>
\r
40 User-Agent: Mutt/1.5.23 (2014-03-12)
\r
41 Cc: notmuch@notmuchmail.org
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Wed, 22 Oct 2014 01:51:09 -0000
\r
56 Quoth Mark Walters on Oct 22 at 12:17 am:
\r
57 > On Tue, 07 Oct 2014, Austin Clements <aclements@csail.mit.edu> wrote:
\r
58 > > From: Austin Clements <amdragon@mit.edu>
\r
60 > > Previously, it was necessary to link new messages to children to work
\r
61 > > around some (though not all) problems with the old metadata-based
\r
62 > > approach to stored thread IDs. With ghost messages, this is no longer
\r
63 > > necessary, so don't bother with child linking when ghost messages are
\r
66 > > lib/database.cc | 21 +++++++++++++++++----
\r
67 > > 1 file changed, 17 insertions(+), 4 deletions(-)
\r
69 > > diff --git a/lib/database.cc b/lib/database.cc
\r
70 > > index 1316529..6e51a72 100644
\r
71 > > --- a/lib/database.cc
\r
72 > > +++ b/lib/database.cc
\r
73 > > @@ -2169,10 +2169,23 @@ _notmuch_database_link_message (notmuch_database_t *notmuch,
\r
77 > > - status = _notmuch_database_link_message_to_children (notmuch, message,
\r
81 > > + if (! (notmuch->features & NOTMUCH_FEATURE_GHOSTS)) {
\r
82 > > + /* In general, it shouldn't be necessary to link children,
\r
83 > > + * since the earlier indexing of those children will have
\r
84 > > + * stored a thread ID for the missing parent. However, prior
\r
85 > > + * to ghost messages, these stored thread IDs were NOT
\r
86 > > + * rewritten during thread merging (and there was no
\r
87 > > + * performant way to do so), so if indexed children were
\r
88 > > + * pulled into a different thread ID by a merge, it was
\r
89 > > + * necessary to pull them *back* into the stored thread ID of
\r
90 > > + * the parent. With ghost messages, we just rewrite the
\r
91 > > + * stored thread IDs during merging, so this workaround isn't
\r
92 > > + * necessary. */
\r
93 > > + status = _notmuch_database_link_message_to_children (notmuch, message,
\r
99 > Ok so this basically answers my earlier comment. It might be worth
\r
100 > updating the big comment at the start of the function to match the new
\r
105 diff --git a/lib/database.cc b/lib/database.cc
\r
106 index d063ec8..3601f9d 100644
\r
107 --- a/lib/database.cc
\r
108 +++ b/lib/database.cc
\r
109 @@ -2136,11 +2136,11 @@ _consume_metadata_thread_id (void *ctx, notmuch_database_t *notmuch,
\r
110 * reference 'message'.
\r
112 * In all cases, we assign to the current message the first thread ID
\r
113 - * found (through either parent or child). We will also merge any
\r
114 - * existing, distinct threads where this message belongs to both,
\r
115 - * (which is not uncommon when messages are processed out of order).
\r
116 + * found. We will also merge any existing, distinct threads where this
\r
117 + * message belongs to both, (which is not uncommon when messages are
\r
118 + * processed out of order).
\r
120 - * Finally, if no thread ID has been found through parent or child, we
\r
121 + * Finally, if no thread ID has been found through referenced messages, we
\r
122 * call _notmuch_message_generate_thread_id to generate a new thread
\r
123 * ID. This should only happen for new, top-level messages, (no
\r
124 * References or In-Reply-To header in this message, and no previously
\r
132 > > /* If not part of any existing thread, generate a new thread ID. */
\r
133 > > if (thread_id == NULL) {
\r
135 > > _______________________________________________
\r
136 > > notmuch mailing list
\r
137 > > notmuch@notmuchmail.org
\r
138 > > http://notmuchmail.org/mailman/listinfo/notmuch
\r