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 141C6431FC0 for ; Wed, 24 Sep 2014 14:39:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] 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 WGCKgjYx6aXG for ; Wed, 24 Sep 2014 14:39:13 -0700 (PDT) Received: from resqmta-po-01v.sys.comcast.net (resqmta-po-01v.sys.comcast.net [96.114.154.160]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 58914431FBD for ; Wed, 24 Sep 2014 14:39:13 -0700 (PDT) Received: from resomta-po-08v.sys.comcast.net ([96.114.154.232]) by resqmta-po-01v.sys.comcast.net with comcast id v9cq1o00F516pyw019fCrL; Wed, 24 Sep 2014 21:39:12 +0000 Received: from odin.tremily.us ([24.18.63.50]) by resomta-po-08v.sys.comcast.net with comcast id v9fB1o00F152l3L019fBrW; Wed, 24 Sep 2014 21:39:12 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id 2363413BF318; Wed, 24 Sep 2014 14:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1411594751; bh=29xaQ83nIobJVVFWBjPYb704ixo/48owUqP7Ai1sSY8=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=LUe/f5wXQm6FJuVyo/Lz857N1XKqRYSwagcpgxRuOnPYCqIhNhulyYpUq0Uq8lyMl td9udCIy3Qs5oIkQmycYUZpseHZhQezs0dzPTpk5n09Sh0j1dPxCH9Ow9U2jUgqIHl Sg24mfkMuTyJBABK39wPLiJ+0/LL7c7SvpXgPneU= Date: Wed, 24 Sep 2014 14:39:10 -0700 From: "W. Trevor King" To: Austin Clements Subject: Re: [PATCH v3] lib: Simplify close and codify aborting atomic section Message-ID: <20140924213910.GF20130@odin.tremily.us> References: <20140924212839.GE20130@odin.tremily.us> <1411594370-9794-1-git-send-email-aclements@csail.mit.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/aVve/J9H4Wl5yVO" Content-Disposition: inline In-Reply-To: <1411594370-9794-1-git-send-email-aclements@csail.mit.edu> OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; url=http://tremily.us/pubkey.txt User-Agent: Mutt/1.5.23 (2014-03-12) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1411594752; bh=eYRnpNHm1iV1mw9zTioOAa0EC+gQm3Hz9kEszYhumnM=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=IVy8EBUrxx/MDo+kR3COBt/AUXbtou65GBH8PIb2GxMdmeWBQfCIq5ky3c2/svD+o V1EFyvo3eOSqEGT+xEAtc94HkcBRT48QRfaWq18IwCpjx7yHczzce/6FWK+6iJ5/qx 3heNHsOjVVHocFrobgISiCMwViycfvk/nrIPo5tv/jACyKcyL4ZdlGHjy//m/hpsSq QLa4NGhuKslKnG/ZO28NpZsIpNN2sMfbP8KZeNwD2C4RIMC883e2x75nQhP8E4CMNI wruICUxrTNk84PghrXI68R+CvVP7fId1rvhmeA4dvV2GdYgkqY3XxF62TNMb/S+Tar NbQcqaszrShoA== 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: Wed, 24 Sep 2014 21:39:21 -0000 --/aVve/J9H4Wl5yVO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 24, 2014 at 05:32:50PM -0400, Austin Clements wrote: > + * If the caller is currently in an atomic section (there was a > + * notmuch_database_begin_atomic without a matching > + * notmuch_database_end_atomic), this will abort the atomic section, > + * discarding any modifications made in the atomic section. All > + * changes up to this will be committed. I still think Xapian's wording is more readable [1]: For a WritableDatabase, if a transaction is active it will be aborted, while if no transaction is active commit() will be implicitly called. How about: For a writable database, if a transaction is active (there was a notmuch_database_begin_atomic without a matching notmuch_database_end_atomic) it will be aborted, while if no transaction is active any pending changes will be committed. Cheers, Trevor [1]: http://xapian.org/docs/apidoc/html/classXapian_1_1Database.html#a59f5f= 8b137723dcaaabdbdccbc0cf1eb --=20 This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy --/aVve/J9H4Wl5yVO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIbBAEBAgAGBQJUIzn8AAoJEG8/JgBt8ol8SQYP9ihcFBhpSiczMQM0iTuPKBrV cc6qh6KnQLf9U6BZDbFEO5Jf1jfk+y1j96229gwMYf7PXYPLXTyRX7tl4/8qNAQr 9FDB/ChBUJNgSAONEVDdVMEAmkxKXf0XUoATrduhKT1gljlGLxcobqrp2/deCxny BHcGXLOqo2U8vtBlqRfqxE+4pm0y6bINQ6U5JXhiw5IYZMyyE3d7WgsPSFn0clFc /+BagDpqd+TGYvlT/A7htXBaUrqjCEOfX31JfblrmM50YXiHFPpEHSF/aFCUchT8 FTLHuFXZemvHNeBbdTTR8PhdZJsDXM1ghDn4/CyMltwjNuKhnxlQ2YVWpiXhgfX6 p180/p20WdJtr5O96c/SoYRbfqVhmuBegv+s59EcS4t3zbjDxJQ4LR+BaVyip1TZ UEwVc2MLYTF8nqlJcn5elbe7Xmh50q8mwh098cYbVh03DNlPJUvSRmBkYrjf2opN sTVnW4WwA7YcNdChsxami2bCr1umRPNDEwuEs937+MtWTVAtyM2TUIXRqqxxAu6v 4uME+xIZgPdEljktlwk7KvBGSf4ABD1uZdFr7wVONiFsvFsg1pP91JJ+bDDgOXBv HRzxqqq9wosDxbHXtKNQVIMvGYZUfiWikzGwvMTYyRGH5I7c3FcVS2+Tbrmkwe8s +DSeIXNIk6nxvyC51c4= =foFN -----END PGP SIGNATURE----- --/aVve/J9H4Wl5yVO--