1 Return-Path: <wking@tremily.us>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 1309A431FAF
\r
6 for <notmuch@notmuchmail.org>; Wed, 24 Sep 2014 11:18:55 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id USBT1VmM-YhC for <notmuch@notmuchmail.org>;
\r
17 Wed, 24 Sep 2014 11:18:47 -0700 (PDT)
\r
18 Received: from resqmta-po-10v.sys.comcast.net (resqmta-po-10v.sys.comcast.net
\r
20 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 8EF68431FB6
\r
23 for <notmuch@notmuchmail.org>; Wed, 24 Sep 2014 11:18:47 -0700 (PDT)
\r
24 Received: from resomta-po-05v.sys.comcast.net ([96.114.154.229])
\r
25 by resqmta-po-10v.sys.comcast.net with comcast
\r
26 id v6Hg1o0054xDoy8016JmzM; Wed, 24 Sep 2014 18:18:46 +0000
\r
27 Received: from odin.tremily.us ([24.18.63.50])
\r
28 by resomta-po-05v.sys.comcast.net with comcast
\r
29 id v6Jk1o00Z152l3L016JlmV; Wed, 24 Sep 2014 18:18:46 +0000
\r
30 Received: by odin.tremily.us (Postfix, from userid 1000)
\r
31 id 5E02013AAE54; Wed, 24 Sep 2014 11:18:44 -0700 (PDT)
\r
32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;
\r
33 t=1411582724; bh=ESxq4zvkO7kDZZsV0WbZ6eHX4vMoVbfXfq+1N6BjDwM=;
\r
34 h=Date:From:To:Cc:Subject:References:In-Reply-To;
\r
35 b=ONVCOwS6udawzn9MEri4X5nJo6eqx99MUXh0nfpH69T0IpakTRAKynGdGX/BTaTfR
\r
36 xeKtkVn4BFrnHITiRwix94jQu++EuHOUO+PaUMnZ4YI3FBQkRG/ZXtARWv9t1RtgY7
\r
37 3w/sszkyb3riurpDmU57RmcYLw63uksPeImvi/aI=
\r
38 Date: Wed, 24 Sep 2014 11:18:44 -0700
\r
39 From: "W. Trevor King" <wking@tremily.us>
\r
40 To: David Bremner <david@tethera.net>
\r
41 Subject: Re: [PATCH] lib: Simplify close and codify aborting atomic section
\r
42 Message-ID: <20140924181844.GB20130@odin.tremily.us>
\r
43 References: <1411400615-20934-1-git-send-email-amdragon@mit.edu>
\r
44 <20140922165954.GI20827@odin.tremily.us>
\r
45 <20140922185050.GB7970@csail.mit.edu>
\r
46 <20140922190022.GO20827@odin.tremily.us>
\r
47 <87iokc28mg.fsf@maritornes.cs.unb.ca>
\r
49 Content-Type: multipart/signed; micalg=pgp-sha1;
\r
50 protocol="application/pgp-signature"; boundary="1UWUbFP1cBYEclgG"
\r
51 Content-Disposition: inline
\r
52 In-Reply-To: <87iokc28mg.fsf@maritornes.cs.unb.ca>
\r
53 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;
\r
54 url=http://tremily.us/pubkey.txt
\r
55 User-Agent: Mutt/1.5.23 (2014-03-12)
\r
56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
\r
57 s=q20140121; t=1411582726;
\r
58 bh=eRafiU43Gwq9vkf0njWP4NVZ12XLeJfHqI1u0bYFxUc=;
\r
59 h=Received:Received:Received:Date:From:To:Subject:Message-ID:
\r
60 MIME-Version:Content-Type;
\r
61 b=R7oxq4ODApSoEEGXge3LQtWCg1wyoI9apqJKLQv8vlf9kJxxRM9MoERSyCFoAh71F
\r
62 kjZuIihPwiFxdteZusNImvtJXlPxqnvEldnqpf+/4XZgbtBnSgOeV0QwOQGIYb4aiy
\r
63 kJIvQqHLLdIeCULHhYL81VTD0HFt4+o6VM0qt7n4ejrRMLsW4d1cFO5e75PvxCuuVG
\r
64 /ghysKsaedyEAZ8rM0jKbb1exBCoOgQOzOpJGjxhA4e9gK+xoSGmrndmMgVUkG4wT1
\r
65 dErHt3xD0AWnfNQW9saTFDFXPa/AYlrwtCGQHyg6C/L590b8Fg/VB5GD0k7R7+rPnO
\r
67 Cc: notmuch@notmuchmail.org
\r
68 X-BeenThere: notmuch@notmuchmail.org
\r
69 X-Mailman-Version: 2.1.13
\r
71 List-Id: "Use and development of the notmuch mail system."
\r
72 <notmuch.notmuchmail.org>
\r
73 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
75 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
76 List-Post: <mailto:notmuch@notmuchmail.org>
\r
77 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
78 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
79 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
80 X-List-Received-Date: Wed, 24 Sep 2014 18:18:55 -0000
\r
84 Content-Type: text/plain; charset=us-ascii
\r
85 Content-Disposition: inline
\r
86 Content-Transfer-Encoding: quoted-printable
\r
88 On Wed, Sep 24, 2014 at 08:09:27PM +0200, David Bremner wrote:
\r
89 > W. Trevor King writes:
\r
90 > > Ah, I thought the implicit flush/commit was just in our code.
\r
91 > > Since it's also in the underlying Xapian close, then this patch
\r
92 > > looks pretty good to me. I'd mention Xapian's explicit close in
\r
93 > > the notmuch.h message. Xapain's docs say [1]:
\r
95 > > For a WritableDatabase, if a transaction is active it will be
\r
96 > > aborted, while if no transaction is active commit() will be
\r
97 > > implicitly called.
\r
99 > I'm not sure what you're asking for here by "explicit close". Isn't
\r
100 > what you quote a restatement of
\r
102 > + * If the caller is currently in an atomic section (there was a
\r
103 > + * notmuch_database_begin_atomic without a matching
\r
104 > + * notmuch_database_end_atomic), this will abort the atomic section,
\r
105 > + * discarding any modifications made in the atomic section.
\r
107 > in terms of underyling Xapian mechanics?
\r
109 Sorry, I didn't phrase that very well. The notmuch docs (as of this
\r
110 patch) explain that we don't commit if we're in an atomic block. The
\r
111 Xapian docs also say that, *and* they say that if we're not in atomic
\r
112 block the close *does* try to commit. I think that's worth mentioning
\r
119 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
\r
120 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
\r
123 Content-Type: application/pgp-signature; name="signature.asc"
\r
124 Content-Description: OpenPGP digital signature
\r
126 -----BEGIN PGP SIGNATURE-----
\r
129 iQIcBAEBAgAGBQJUIwsBAAoJEG8/JgBt8ol8G+wP/15WCG6fH4ZKsKy9s5hBJz6X
\r
130 PkqY3ZE7ahjTIBJzRlnCLecOiSsh1NmBGswJuC0WdGfvfJmL4qTrXxaQR9qIZszx
\r
131 YLeBMdgeFxNX0TfvMI8UG7KPgOxe65uGYA33/EGScIluWnrKRq+xIv8itL5+0WaE
\r
132 q7YCiZ9HUTHhIKFR0UOBPqPkovAk52y6cZEssTZMo5CX/ULdgm3BeqOOFfH2PZIP
\r
133 6QHRPrhNiv9bCVOVNs+Yvvfsd77mdGdWH7T6SqE1E3YYeexga8nJanCy0bwKKgWV
\r
134 S7AYOKIdP3RQsjTNY1m+6+bhvLDNClMJFgSYFygYDYk/jog8hXvyeApwluSD19oM
\r
135 TJ/+Y7Hlkvt63GU61jHl85XoHvGAM3X/A02veVeyJFzSsE4FoMAfVcbnRNIGTtoh
\r
136 TDLUAB/FNGTvigIy8tkDoP1Y+zIcyK16oFiedLh3+IJ78iwZqGdXJKWm6AiXa6Np
\r
137 5thE4hwGZ5npMnLUnnIApZaXmo6nnBBZNaLdEvo5Dj2u+aP69KOsRlPbeU+9rEue
\r
138 s2rsDbBTD+J7z6dZsoTYEEVk9itO/lLl5/YHvaU1raOvjEycNkbhm6V5qjEnGUpI
\r
139 699Yer/p+mMrgdPCz9hcndIv87wKGi6+bZni6f3Ht0qIz/BVLqRTw/cy9/ZWpkI2
\r
140 pJJbArp9gJhUcL0p2C6w
\r
142 -----END PGP SIGNATURE-----
\r
144 --1UWUbFP1cBYEclgG--
\r