Re: [PATCH v6 00/17] Fix 'notmuch new' atomicity issues
authorAustin Clements <amdragon@mit.edu>
Fri, 8 Jul 2011 18:09:16 +0000 (14:09 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:01 +0000 (09:39 -0800)
b6/3f777f85a1b83742c6a347589590a8734bd445 [new file with mode: 0644]

diff --git a/b6/3f777f85a1b83742c6a347589590a8734bd445 b/b6/3f777f85a1b83742c6a347589590a8734bd445
new file mode 100644 (file)
index 0000000..2727ecb
--- /dev/null
@@ -0,0 +1,136 @@
+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 C450F429E25\r
+       for <notmuch@notmuchmail.org>; Fri,  8 Jul 2011 11:09:18 -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 7MNlAcDFfucs for <notmuch@notmuchmail.org>;\r
+       Fri,  8 Jul 2011 11:09:18 -0700 (PDT)\r
+Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com\r
+       [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id DE8F3431FB6\r
+       for <notmuch@notmuchmail.org>; Fri,  8 Jul 2011 11:09:17 -0700 (PDT)\r
+Received: by qwb7 with SMTP id 7so1221030qwb.26\r
+       for <notmuch@notmuchmail.org>; Fri, 08 Jul 2011 11:09:17 -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=A6VqEHJNe6AAgluU5zJcJErVcy6yuSkJ+pxonyD8sKo=;\r
+       b=I/Mtf42pxa4EsoZtICm5jzyyHIQQydqmM2K2xxK5P1Hr4aOXzgnlNNs9c07xxZdoqK\r
+       aBm7Q5myAs2+n5RWhbsvpKyGu06R7JtRaS661HOCzccZvBfpvwp7z8vrQzgw501i7cWG\r
+       q5C6fCChOIWuniwXwi77kwItEXHplHyUH9bSI=\r
+MIME-Version: 1.0\r
+Received: by 10.229.106.32 with SMTP id v32mr1782522qco.77.1310148557060; Fri,\r
+       08 Jul 2011 11:09:17 -0700 (PDT)\r
+Sender: amdragon@gmail.com\r
+Received: by 10.229.229.211 with HTTP; Fri, 8 Jul 2011 11:09:16 -0700 (PDT)\r
+In-Reply-To: <BANLkTimeWnn5YtKjarFB8f8Fowvz0PxK2Q@mail.gmail.com>\r
+References: <87ei34rnc5.fsf@yoom.home.cworth.org>\r
+       <1307822683-848-1-git-send-email-amdragon@mit.edu>\r
+       <BANLkTimeWnn5YtKjarFB8f8Fowvz0PxK2Q@mail.gmail.com>\r
+Date: Fri, 8 Jul 2011 14:09:16 -0400\r
+X-Google-Sender-Auth: dkzFpN6X4-yTEfI0GHclH7fhlVE\r
+Message-ID:\r
+ <CAH-f9WvAFuVp-6u6tFgbcPEGW304wkGy=uhSOGhbNXd0m7H3mw@mail.gmail.com>\r
+Subject: Re: [PATCH v6 00/17] Fix 'notmuch new' atomicity issues\r
+From: Austin Clements <amdragon@mit.edu>\r
+To: Carl Worth <cworth@cworth.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, 08 Jul 2011 18:09:19 -0000\r
+\r
+Rebased against current master and now atomic-new-v7 on\r
+  http://awakening.csail.mit.edu/git/notmuch.git\r
+There were a handful of conflicts, but nothing substantive.\r
+\r
+On Wed, Jun 22, 2011 at 3:39 PM, Austin Clements <amdragon@mit.edu> wrote:\r
+> Ping.\r
+>\r
+> On Sat, Jun 11, 2011 at 4:04 PM, Austin Clements <amdragon@mit.edu> wrote=\r
+:\r
+>> Here's the reworked patch series that uses atomic sections more\r
+>> heavily rather than changing the removal API. =A0This is atomic-new-v6\r
+>> on http://awakening.csail.mit.edu/git/notmuch.git .\r
+>>\r
+>> (I was planning to make this series on Monday while stuck on a plane,\r
+>> but an opportunity presented itself when I needed something better to\r
+>> do than fix the sink. =A0As a result, if you can look over this before\r
+>> Monday, I can use that time to address any further comments.)\r
+>>\r
+>> The beginning of the sequence---"test: Fix message when skipping\r
+>> test_expect_equal* tests" through "new: Defer updating directory\r
+>> mtimes until the end."---has not changed besides than the minor things\r
+>> you pointed out earlier. =A0Here's a quick summary of the differences in\r
+>> the rest of the sequence:\r
+>>\r
+>> lib: Add notmuch_database_{begin,end}_atomic.\r
+>> =A0Rebased but otherwise identical.\r
+>>\r
+>> lib: Add support for nested atomic sections.\r
+>> =A0New.\r
+>>\r
+>> lib: Indicate if there are more filenames after removal.\r
+>> =A0Rebased but otherwise identical.\r
+>>\r
+>> lib: Remove message document directly after removing the last file\r
+>> name.\r
+>> =A0New. =A0Supersedes the patches that rewrote\r
+>> =A0notmuch_database_remove_message and made sync delete messages.\r
+>>\r
+>> lib: Add an API to find a message by filename.\r
+>> =A0Culled from "lib: Add API's to find by filename and ..." in the old\r
+>> =A0series. =A0What I kept is identical.\r
+>>\r
+>> lib: Wrap notmuch_database_add_message in an atomic section.\r
+>> =A0New.\r
+>>\r
+>> new: Cleanup. Put removed/renamed message count in add_files_state_t.\r
+>> new: Cleanup. De-duplicate file name removal code.\r
+>> =A0Both new, but closely related to previous remove_filename patch.\r
+>>\r
+>> new: Synchronize maildir flags eagerly.\r
+>> =A0New, but very closely related to previous patch of the same name.\r
+>> =A0This patch is simpler now because of the previous two cleanups.\r
+>>\r
+>> new: Wrap adding and removing messages in atomic sections.\r
+>> =A0Rebased and added an atomic section around removal.\r
+>>\r
+>> lib: Improve notmuch_database_{add,remove}_message documentation.\r
+>> =A0New.\r
+>>\r
+>> Ultimately, I still think the existing removal API is weird because it\r
+>> forces you to do things like lookup a message by file name just in\r
+>> case you need that message object after removal tells you that it\r
+>> didn't actually remove the message. =A0But I don't know what to do about\r
+>> it that isn't equally weird.\r
+>>\r
+>> _______________________________________________\r
+>> notmuch mailing list\r
+>> notmuch@notmuchmail.org\r
+>> http://notmuchmail.org/mailman/listinfo/notmuch\r
+>>\r
+>\r