Re: [PATCH 2/2] [RFC] possible solution for "Race condition for '*' command"
authorAustin Clements <amdragon@mit.edu>
Fri, 1 Jul 2011 14:55:13 +0000 (10:55 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:54 +0000 (09:38 -0800)
5b/d47e32ce3129af10b338b8a0242087fb71e1c6 [new file with mode: 0644]

diff --git a/5b/d47e32ce3129af10b338b8a0242087fb71e1c6 b/5b/d47e32ce3129af10b338b8a0242087fb71e1c6
new file mode 100644 (file)
index 0000000..bb65806
--- /dev/null
@@ -0,0 +1,105 @@
+Return-Path: <amdragon@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 51FD141ED93\r
+       for <notmuch@notmuchmail.org>; Fri,  1 Jul 2011 07:55:15 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id avFKwAzyFr0w for <notmuch@notmuchmail.org>;\r
+       Fri,  1 Jul 2011 07:55:14 -0700 (PDT)\r
+Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com\r
+       [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 8BD0441ED86\r
+       for <notmuch@notmuchmail.org>; Fri,  1 Jul 2011 07:55:14 -0700 (PDT)\r
+Received: by qyk9 with SMTP id 9so2189003qyk.5\r
+       for <notmuch@notmuchmail.org>; Fri, 01 Jul 2011 07:55:13 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=mime-version:sender:in-reply-to:references:date\r
+       :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+       :content-transfer-encoding;\r
+       bh=UJMkV0UwUTQf9t7I5b1BQ+dVypEj5dkma/xNfUHKiCo=;\r
+       b=DHEqfJB8LXqBpW9Y8vmwQ8YxhLwBZpxwkyHfx4dPywa/sWM90cbvKewPBO/ycEpXTV\r
+       YoFpLLhRPBlVli1gVJZECf2gxmzoeIzdQp8eT68c+swA0cvXk0lrNGtzGsQFAfNTnVFw\r
+       W6NSIljdkz/XYMhnj/9E3gMyR5Gbjduw1Edkc=\r
+MIME-Version: 1.0\r
+Received: by 10.229.106.32 with SMTP id v32mr2616575qco.77.1309532113634; Fri,\r
+       01 Jul 2011 07:55:13 -0700 (PDT)\r
+Sender: amdragon@gmail.com\r
+Received: by 10.229.249.193 with HTTP; Fri, 1 Jul 2011 07:55:13 -0700 (PDT)\r
+In-Reply-To: <87r56brtxt.fsf@praet.org>\r
+References: <8739itagad.fsf@yoom.home.cworth.org>\r
+       <1309450108-2793-1-git-send-email-pieter@praet.org>\r
+       <1309450108-2793-2-git-send-email-pieter@praet.org>\r
+       <87r56brtxt.fsf@praet.org>\r
+Date: Fri, 1 Jul 2011 10:55:13 -0400\r
+X-Google-Sender-Auth: Ivdxn_e_u2WGmM6XswSPWWGP7ok\r
+Message-ID:\r
+ <CAH-f9WstN909tsDepsmPUvfgudkv0mHTzsvuRAeq0B+-ywtrrw@mail.gmail.com>\r
+Subject: Re: [PATCH 2/2] [RFC] possible solution for "Race condition for '*'\r
+       command"\r
+From: Austin Clements <amdragon@mit.edu>\r
+To: Pieter Praet <pieter@praet.org>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 01 Jul 2011 14:55:15 -0000\r
+\r
+On Thu, Jun 30, 2011 at 3:38 PM, Pieter Praet <pieter@praet.org> wrote:\r
+> Ok, even though my very first reply [1] may have created the impression\r
+> that I understood the issue, I clearly didn't...\r
+>\r
+> The test [2] needs a more applicable commit message, and the subsequent\r
+> patch [3] points more or less in the right direction, but the Message-Id\r
+> list should be local to the *search buffer* rather than to the\r
+> `notmuch-search-operate-all' function.\r
+>\r
+> `notmuch-search' could:\r
+> =A0- run "notmuch-command search" with the "--output=3Dmessages" option\r
+> =A0 =A0instead of a plain search,\r
+> =A0- maintain a buffer-local var with a list of returned Message-Id's,\r
+> =A0- ...and populate the buffer based on that list.\r
+>\r
+> As such we'd have -for each individual search buffer- a canonical list\r
+> of Message-Id's (i.e. messages which actually *match* the query AND are\r
+> currently visible in the search buffer), to be used by\r
+> `notmuch-search-operate-all' et al.\r
+>\r
+>\r
+> Peace\r
+>\r
+> --\r
+> Pieter\r
+>\r
+> [1] id:"87fwmuxxgd.fsf@praet.org"\r
+> [2] id:"1309450108-2793-2-git-send-email-pieter@praet.org"\r
+> [3] id:"1309450108-2793-1-git-send-email-pieter@praet.org"\r
+\r
+Ideally, this wouldn't be per-buffer, but per *line*.  This race\r
+equally affects adding and removing tags from individual results,\r
+since that's done using a thread: query, whose results could have\r
+changed since the original search.\r
+\r
+This almost certainly requires support from the notmuch core.  The\r
+good news is that the library already provides this information, so\r
+there will be virtually no performance hit for outputting it.\r