Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F126C431FD0 for ; Fri, 10 Jun 2011 15:02:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BwBGMLuzzm6t for ; Fri, 10 Jun 2011 15:02:33 -0700 (PDT) Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2]) by olra.theworths.org (Postfix) with ESMTP id 26280431FB6 for ; Fri, 10 Jun 2011 15:02:33 -0700 (PDT) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0166429A045; Fri, 10 Jun 2011 15:02:31 -0700 (PDT) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id E1F94254149; Fri, 10 Jun 2011 15:02:31 -0700 (PDT) From: Carl Worth To: Austin Clements Subject: Re: [PATCH 00/10] Fix 'notmuch new' atomicity issues In-Reply-To: <20110610211103.GC16025@mit.edu> References: <1298015940-31986-1-git-send-email-amdragon@mit.edu> <87ei34rnc5.fsf@yoom.home.cworth.org> <20110610211103.GC16025@mit.edu> User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Date: Fri, 10 Jun 2011 15:02:25 -0700 Message-ID: <87boy5qr9q.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2011 22:02:34 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, 10 Jun 2011 17:11:03 -0400, Austin Clements wrot= e: > Mm. It's now remove_filename (could be remove_message_filename?) I like remove_filename just fine. Thanks. > I've pushed the easy changes as atomic-new-v5, mostly to get them in > the record. Thanks. I'll look. These should all be ready to push with the discussion-pending stuff to come? > But, maybe they sharpen it in the wrong direction. An alternate way > to look at this is that a message is a single file that can also tell > you file names that contain equivalent messages. This might be more > of a mindset (or documentation change) than an actual API change; I'm > not sure. It certainly fits better with the existing > {add,remove}_message, but it's not clear if that's intentional or > historical. Thoughts? That seems to match what I had in mind when I designed the original {add,remove}_message, yes. So I'm interested in running with this to see if we can't make it work. One trick is that most of the early design was done by me in a vacuum. I think we're fortunate to now have a wider community to help catch design mistakes of mine. > > * Can we fix the remove case without this new library API by simply > > adding calls to begin_atomic and end_atomic? > >=20 > > I think this is probably the solution I would prefer to see. > >=20 > > What do you think, Austin? >=20 > Of these three, I would definitely go with the last. Good. We're thinking along the same lines at least. > That last reason is also compatible with your last suggestion. If we > move to atomic sections, I think we have to make sure the library > never internally violates atomicity and that the library user only > needs to use atomic sections directly if they need atomicity across > multiple library calls. This shouldn't be hard, especially with > nested atomics. Thanks for providing so much of your rationale. The constraint you describe here sounds perfect. With the library respecting this, it seems it would make it very easy for anyone reviewing notmuch-new.c (or implementing something similar from scratch) to correctly identify the spots that need begin_atomic/end_atomic. > I'll give this a try and see where it leads. I'm looking forward to what you come up with.[*] =2DCarl [*] To satisfy grammarian pedantism=E2=80=94A preposition (let alone two) is something you should never end a sentence with=E2=80=94I might offer: I'm looking forward to that with which you up will come. =2D-=20 carl.d.worth@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3ylHEACgkQ6JDdNq8qSWhB0ACglqSKZPs0dNq+O6CPkuhfrVGO fWcAoJcBm83dwO6TehanrIob1lsrif2a =D0I/ -----END PGP SIGNATURE----- --=-=-=--