1 Return-Path: <amdragon@gmail.com>
\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 BC12041ED96
\r
6 for <notmuch@notmuchmail.org>; Fri, 1 Jul 2011 09:37:13 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.698 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,
\r
13 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id 6tLznxgu3mZr for <notmuch@notmuchmail.org>;
\r
17 Fri, 1 Jul 2011 09:37:12 -0700 (PDT)
\r
18 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com
\r
19 [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id B040441ED8C
\r
22 for <notmuch@notmuchmail.org>; Fri, 1 Jul 2011 09:37:12 -0700 (PDT)
\r
23 Received: by qyk9 with SMTP id 9so2248310qyk.5
\r
24 for <notmuch@notmuchmail.org>; Fri, 01 Jul 2011 09:37:12 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=mime-version:sender:date:x-google-sender-auth:message-id:subject
\r
27 :from:to:cc:content-type;
\r
28 bh=M2SN8lXY5a8KsS1KTGJxjEFHyAxUzZUeyhcWllEgVZI=;
\r
29 b=mobY+Ckbss5v885pGUA8fSFV5ETNhvefZjOvzXQkA7w90XlzB2x6lnfsMbZTUgM2es
\r
30 oFwcxshMTT2OQQkfB0HQld4pZnHu51oeZwVJb1uvTNZoA45MMArNXdE138oyKQ9k2QU3
\r
31 OpJRRqmLCpm0gx6K1VL3n248I9jbpF6nI+zsU=
\r
33 Received: by 10.229.2.89 with SMTP id 25mr2702766qci.39.1309538231775; Fri, 01
\r
34 Jul 2011 09:37:11 -0700 (PDT)
\r
35 Sender: amdragon@gmail.com
\r
36 Received: by 10.229.249.193 with HTTP; Fri, 1 Jul 2011 09:37:11 -0700 (PDT)
\r
37 Received: by 10.229.249.193 with HTTP; Fri, 1 Jul 2011 09:37:11 -0700 (PDT)
\r
38 Date: Fri, 1 Jul 2011 12:37:11 -0400
\r
39 X-Google-Sender-Auth: t2iRJO4tosjFqsllPWskVp_-RUg
\r
41 <CAH-f9WticM4EN8F1_ik_-mcBcBtrXwSpO+Drbtp7=UN7McECrg@mail.gmail.com>
\r
42 Subject: Re: [PATCH 2/2] [RFC] possible solution for "Race condition for '*'
\r
44 From: Austin Clements <amdragon@mit.edu>
\r
45 To: Austin Clements <amdragon@mit.edu>
\r
46 Content-Type: multipart/alternative; boundary=00148537ab781ff39f04a704a101
\r
47 Cc: notmuch@notmuchmail.org
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Fri, 01 Jul 2011 16:37:14 -0000
\r
62 --00148537ab781ff39f04a704a101
\r
63 Content-Type: text/plain; charset=ISO-8859-1
\r
65 On Jul 1, 2011 10:55 AM, "Austin Clements" <amdragon@mit.edu> wrote:
\r
67 > On Thu, Jun 30, 2011 at 3:38 PM, Pieter Praet <pieter@praet.org> wrote:
\r
68 > > Ok, even though my very first reply [1] may have created the impression
\r
69 > > that I understood the issue, I clearly didn't...
\r
71 > > The test [2] needs a more applicable commit message, and the subsequent
\r
72 > > patch [3] points more or less in the right direction, but the Message-Id
\r
73 > > list should be local to the *search buffer* rather than to the
\r
74 > > `notmuch-search-operate-all' function.
\r
76 > > `notmuch-search' could:
\r
77 > > - run "notmuch-command search" with the "--output=messages" option
\r
78 > > instead of a plain search,
\r
79 > > - maintain a buffer-local var with a list of returned Message-Id's,
\r
80 > > - ...and populate the buffer based on that list.
\r
82 > > As such we'd have -for each individual search buffer- a canonical list
\r
83 > > of Message-Id's (i.e. messages which actually *match* the query AND are
\r
84 > > currently visible in the search buffer), to be used by
\r
85 > > `notmuch-search-operate-all' et al.
\r
93 > > [1] id:"87fwmuxxgd.fsf@praet.org"
\r
94 > > [2] id:"1309450108-2793-2-git-send-email-pieter@praet.org"
\r
95 > > [3] id:"1309450108-2793-1-git-send-email-pieter@praet.org"
\r
97 > Ideally, this wouldn't be per-buffer, but per *line*. This race
\r
98 > equally affects adding and removing tags from individual results,
\r
99 > since that's done using a thread: query, whose results could have
\r
100 > changed since the original search.
\r
102 > This almost certainly requires support from the notmuch core. The
\r
103 > good news is that the library already provides this information, so
\r
104 > there will be virtually no performance hit for outputting it.
\r
106 Actually, with a smidgeon of library support, you could even use document
\r
107 IDs for this, rather than message IDs, which would make the tagging
\r
108 operations (even '*') no more expensive than they are now. (Of course, it
\r
109 would be good to know just how much overhead going through message IDs
\r
110 actually introduces.)
\r
112 --00148537ab781ff39f04a704a101
\r
113 Content-Type: text/html; charset=ISO-8859-1
\r
114 Content-Transfer-Encoding: quoted-printable
\r
116 <p>On Jul 1, 2011 10:55 AM, "Austin Clements" <<a href=3D"mail=
\r
117 to:amdragon@mit.edu">amdragon@mit.edu</a>> wrote:<br>
\r
119 > On Thu, Jun 30, 2011 at 3:38 PM, Pieter Praet <<a href=3D"mailto:pi=
\r
120 eter@praet.org">pieter@praet.org</a>> wrote:<br>
\r
121 > > Ok, even though my very first reply [1] may have created the impr=
\r
123 > > that I understood the issue, I clearly didn't...<br>
\r
125 > > The test [2] needs a more applicable commit message, and the subs=
\r
127 > > patch [3] points more or less in the right direction, but the Mes=
\r
129 > > list should be local to the *search buffer* rather than to the<br=
\r
131 > > `notmuch-search-operate-all' function.<br>
\r
133 > > `notmuch-search' could:<br>
\r
134 > > =A0- run "notmuch-command search" with the "--outp=
\r
135 ut=3Dmessages" option<br>
\r
136 > > =A0 =A0instead of a plain search,<br>
\r
137 > > =A0- maintain a buffer-local var with a list of returned Message-=
\r
139 > > =A0- ...and populate the buffer based on that list.<br>
\r
141 > > As such we'd have -for each individual search buffer- a canon=
\r
143 > > of Message-Id's (i.e. messages which actually *match* the que=
\r
145 > > currently visible in the search buffer), to be used by<br>
\r
146 > > `notmuch-search-operate-all' et al.<br>
\r
149 > > Peace<br>
\r
152 > > Pieter<br>
\r
154 > > [1] id:"<a href=3D"mailto:87fwmuxxgd.fsf@praet.org">87fwmuxx=
\r
155 gd.fsf@praet.org</a>"<br>
\r
156 > > [2] id:"<a href=3D"mailto:1309450108-2793-2-git-send-email-p=
\r
157 ieter@praet.org">1309450108-2793-2-git-send-email-pieter@praet.org</a>"=
\r
159 > > [3] id:"<a href=3D"mailto:1309450108-2793-1-git-send-email-p=
\r
160 ieter@praet.org">1309450108-2793-1-git-send-email-pieter@praet.org</a>"=
\r
163 > Ideally, this wouldn't be per-buffer, but per *line*. =A0This race=
\r
165 > equally affects adding and removing tags from individual results,<br>
\r
166 > since that's done using a thread: query, whose results could have<=
\r
168 > changed since the original search.<br>
\r
170 > This almost certainly requires support from the notmuch core. =A0The<b=
\r
172 > good news is that the library already provides this information, so<br=
\r
174 > there will be virtually no performance hit for outputting it.</p>
\r
175 <p>Actually, with a smidgeon of library support, you could even use documen=
\r
176 t IDs for this, rather than message IDs, which would make the tagging opera=
\r
177 tions (even '*') no more expensive than they are now.=A0 (Of course=
\r
178 , it would be good to know just how much overhead going through message IDs=
\r
179 actually introduces.)</p>
\r
182 --00148537ab781ff39f04a704a101--
\r