Re: [PATCH 00/11] Fix search tagging races
authorAustin Clements <amdragon@MIT.EDU>
Wed, 9 Oct 2013 16:11:21 +0000 (12:11 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:21 +0000 (09:57 -0800)
b1/3fbede5a098a0db9e18f3b4f6a62ddb75b004a [new file with mode: 0644]

diff --git a/b1/3fbede5a098a0db9e18f3b4f6a62ddb75b004a b/b1/3fbede5a098a0db9e18f3b4f6a62ddb75b004a
new file mode 100644 (file)
index 0000000..c353fd2
--- /dev/null
@@ -0,0 +1,120 @@
+Return-Path: <amdragon@mit.edu>\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 2F674431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  9 Oct 2013 09:11:34 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 1W+yqy0UmPb8 for <notmuch@notmuchmail.org>;\r
+       Wed,  9 Oct 2013 09:11:26 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu\r
+       [18.9.25.15])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7DD85431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  9 Oct 2013 09:11:26 -0700 (PDT)\r
+X-AuditID: 1209190f-b7fa08e0000009c6-c0-5255802d6008\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 84.F8.02502.D2085525; Wed,  9 Oct 2013 12:11:26 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r99GBOFW020932; \r
+       Wed, 9 Oct 2013 12:11:25 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r99GBNDm010359\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Wed, 9 Oct 2013 12:11:24 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VTwM6-0005bp-Iq; Wed, 09 Oct 2013 12:11:22 -0400\r
+Date: Wed, 9 Oct 2013 12:11:21 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH 00/11] Fix search tagging races\r
+Message-ID: <20131009161121.GR21611@mit.edu>\r
+References: <1381185201-25197-1-git-send-email-amdragon@mit.edu>\r
+       <87a9ii28kn.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87a9ii28kn.fsf@qmul.ac.uk>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT19VrCA0y2PuK0WL1XB6L6zdnMjsw\r
+       eeycdZfd49mqW8wBTFFcNimpOZllqUX6dglcGZ83Rhfs5K+4d+IxawPjTJ4uRk4OCQETiUu7\r
+       drJC2GISF+6tZ+ti5OIQEtjHKDFt7TUoZwOjxMKO40wQzikmic97V7BDOEsYJS4/WcoE0s8i\r
+       oCIx9cxcFhCbTUBDYtv+5YwgtoiAjsTtQwvYQWxmAWmJb7+bweqFBYwl1u88wQxi8wLVLJ26\r
+       FOwOIYE4iVs3IGbyCghKnJz5hAWiV0vixr+XQHEOsDnL/3GAhDmBVr3YvQxslSjQCVNObmOb\r
+       wCg0C0n3LCTdsxC6FzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI10cvNLNFLTSndxAgKak5J\r
+       /h2M3w4qHWIU4GBU4uGtKAsNEmJNLCuuzD3EKMnBpCTKO7kOKMSXlJ9SmZFYnBFfVJqTWnyI\r
+       UYKDWUmEN64EKMebklhZlVqUD5OS5mBREue9yWEfJCSQnliSmp2aWpBaBJOV4eBQkuANqAdq\r
+       FCxKTU+tSMvMKUFIM3FwggznARqeC1LDW1yQmFucmQ6RP8WoKCXO6wuSEABJZJTmwfXCks4r\r
+       RnGgV4R5C0CqeIAJC677FdBgJqDB27+HgAwuSURISTUwti6aKOFWHPdA/NGiKfM3xqwPzUy6\r
+       /CuXc9ujQwfKg49bRPOVx3krPsou8T0h9P+bxqk1T86ZTnyUn354+Z+LDA9CmRRmJc25VHni\r
+       vF2g064JRkuX7ryn9cxkRjnjC9W1x3W1N/xYFWV/3NnsxRS71Rcft//VmTS/8XBaPG/Ns9RK\r
+       6bxUxx1PTimxFGckGmoxFxUnAgDmzL5aFQMAAA==\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: Wed, 09 Oct 2013 16:11:34 -0000\r
+\r
+Quoth Mark Walters on Oct 09 at  8:43 am:\r
+> \r
+> On Mon, 07 Oct 2013, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> > I was hacking on undo support for notmuch-emacs and sort of\r
+> > accidentally wrote this instead.  This series fixes a set of\r
+> > well-known races where tagging from search-mode unexpectedly affects\r
+> > messages that arrived after the search was performed (and hence the\r
+> > user doesn't know they're tagging them).  We've attacked this a few\r
+> > times before, but have always run up against something that was\r
+> > missing.  It turns out the pieces are finally all in place.\r
+> >\r
+> > The first five patches just clean various things up in preparation.\r
+> > Patches 6 and 7 add support for tagging large queries, which would\r
+> > otherwise become a problem when later patches start using explicit\r
+> > message ID-based queries for tagging.  The remaining four patches\r
+> > actually fix the search tagging races using explicit message ID-based\r
+> > queries.\r
+> >\r
+> > It's a fairly long series, but none of the patches are very big.\r
+> \r
+> One more thought on this: what should "*+tag" do if the search buffer is\r
+> still filling?\r
+> \r
+> As it stands this is a substantial change: previously you could\r
+> look at the first few threads to make sure the query was doing what you\r
+> expected and then tag all the matching threads. Now you would have to\r
+> wait for the buffer to fill and there is not even a clear indication to\r
+> the user of when that happens (except scroll to the bottom and see if it\r
+> says "End of search results.")\r
+\r
+That's a very interesting point.\r
+\r
+Arguably, this is one situation where it's almost certainly safe to\r
+use the original query: if the search hasn't finished yet, almost\r
+certainly none of the threads have changed.  So, that's one\r
+possibility.\r
+\r
+Another possibility would be to simply echo "Waiting for all search\r
+results...  (Press C-g to cancel)" and wait until the search is done.\r
+\r
+> Best wishes\r
+> \r
+> Mark\r