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 200D1431FBC
\r
6 for <notmuch@notmuchmail.org>; Thu, 2 Oct 2014 12:41:43 -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 sxBMIq1Sfde6 for <notmuch@notmuchmail.org>;
\r
17 Thu, 2 Oct 2014 12:41:39 -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 B0F73431FB6
\r
23 for <notmuch@notmuchmail.org>; Thu, 2 Oct 2014 12:41:37 -0700 (PDT)
\r
24 Received: from resomta-po-14v.sys.comcast.net ([96.114.154.238])
\r
25 by resqmta-po-10v.sys.comcast.net with comcast
\r
26 id yKeE1o00158ss0Y01KhcD2; Thu, 02 Oct 2014 19:41:36 +0000
\r
27 Received: from odin.tremily.us ([24.18.63.50])
\r
28 by resomta-po-14v.sys.comcast.net with comcast
\r
29 id yKhb1o00C152l3L01KhbKS; Thu, 02 Oct 2014 19:41:36 +0000
\r
30 Received: by odin.tremily.us (Postfix, from userid 1000)
\r
31 id DD31A13E8F25; Thu, 2 Oct 2014 12:41:34 -0700 (PDT)
\r
32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;
\r
33 t=1412278894; bh=O2cBIB7jTFDxjqukbJuHzOPTC3oLSdqPHL/wEYcJN0o=;
\r
34 h=Date:From:To:Cc:Subject:References:In-Reply-To;
\r
35 b=baXXcoT/rJf6/NHhmo4t02CC5nfjjZoAMJeLN4sKo9rjAP5C/iOoHS6OR30YINrw9
\r
36 txS3jZrNrIQFfLNSTpsNcDEQAvUdkqavBn2XCvQCfVhwaRrQQLgVs78rfphj0FpyDt
\r
37 SgywKu73i7u1XpCwE7hkyQHhsZwaWjmeMRfuqmtc=
\r
38 Date: Thu, 2 Oct 2014 12:41:34 -0700
\r
39 From: "W. Trevor King" <wking@tremily.us>
\r
40 To: Austin Clements <aclements@csail.mit.edu>
\r
41 Subject: Re: [PATCH v4] lib: Simplify close and codify aborting atomic section
\r
42 Message-ID: <20141002194134.GP3770@odin.tremily.us>
\r
43 References: <87mw9ee0vf.fsf@csail.mit.edu>
\r
44 <1412277548-3445-1-git-send-email-aclements@csail.mit.edu>
\r
46 Content-Type: multipart/signed; micalg=pgp-sha1;
\r
47 protocol="application/pgp-signature"; boundary="o6HUWsywbRjTg5uW"
\r
48 Content-Disposition: inline
\r
49 In-Reply-To: <1412277548-3445-1-git-send-email-aclements@csail.mit.edu>
\r
50 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;
\r
51 url=http://tremily.us/pubkey.txt
\r
52 User-Agent: Mutt/1.5.23 (2014-03-12)
\r
53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
\r
54 s=q20140121; t=1412278896;
\r
55 bh=faIeKtbIFY36XTV19ZnnHdUyOUQFb6Gk3sq2XMAvSCQ=;
\r
56 h=Received:Received:Received:Date:From:To:Subject:Message-ID:
\r
57 MIME-Version:Content-Type;
\r
58 b=FwrbQu+MOthsa7Vz7UsplJSW2bGWtE+ubbSgSmyq9WDfvQwlCvxmOIAeB1l+sSeNB
\r
59 If3Fr7RFnuYKkfLrCiud3zRaMTQdwbEiIcpYZIRBncL3esAVVXYX6ehnGTWSqihhup
\r
60 9a+o5LwyqDZADMy9MIvw+wKxdGA3uD4orV72c31rfS6e/4Cr4h0edDIYFQNwVWQTu7
\r
61 0kyOHsJHcBEzMPBtBZdPfyUpIuSeFNYwjjy4syxe05ko8yaqhtUhoqQspq+uZLbG4B
\r
62 lClagwY0sFMtCyf4QtAA9uu5Xrol8O2NxLlndHu7ljg2v83lFVOiY0hQh3zWX8OY1m
\r
64 Cc: notmuch@notmuchmail.org
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Thu, 02 Oct 2014 19:41:43 -0000
\r
81 Content-Type: text/plain; charset=utf-8
\r
82 Content-Disposition: inline
\r
83 Content-Transfer-Encoding: quoted-printable
\r
85 On Thu, Oct 02, 2014 at 03:19:08PM -0400, Austin Clements wrote:
\r
86 > This patch simplifies notmuch_database_close to explicitly abort any
\r
87 > outstanding transaction and then just call Database::close. This
\r
88 > works for both read-only and read/write databases, takes care of
\r
89 > committing changes, unifies the exception handling path, and codifies
\r
90 > aborting outstanding transactions.
\r
92 I don't expect atomic blocks are particularly useful for read-only
\r
93 connections. If they aren't, I'd quibble with the =E2=80=9CThis works for
\r
94 both read-only=E2=80=A6=E2=80=9D wording above. If they are, I'd drop the =
\r
98 > + /* If there's an outstanding transaction, it's unclear if
\r
99 > + * closing the Xapian database commits everything up to
\r
100 > + * that transaction, or may discard committed (but
\r
101 > + * unflushed) transactions. To be certain, explicitly
\r
102 > + * cancel any outstanding transaction before closing. */
\r
103 > + if (notmuch->mode =3D=3D NOTMUCH_DATABASE_MODE_READ_WRITE &&
\r
104 > + notmuch->atomic_nesting)
\r
105 > + (static_cast <Xapian::WritableDatabase *> (notmuch->xapian_db))
\r
106 > + ->cancel_transaction ();
\r
108 Thats a very minor quibble though, and I'd be glad to see this patch
\r
115 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
\r
116 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
\r
119 Content-Type: application/pgp-signature; name="signature.asc"
\r
120 Content-Description: OpenPGP digital signature
\r
122 -----BEGIN PGP SIGNATURE-----
\r
125 iQIcBAEBAgAGBQJULapsAAoJEG8/JgBt8ol8GN4QAOFz/qxrPe+yBpxImBYdcwFC
\r
126 /pVN73sS+1n8nlNtZn+r7HLIJZIvSd56jKTeE9+kopLZ2wqUiyr8xT8V2iY5oUu6
\r
127 sVLP/YV6hxqeu+bkT/kWhzAZz2VFKdnKeKWL/Oz89ZUDH6PFAyJxcA0eID12+Ojw
\r
128 EnqjCSRqXv1T4vCFsMWEsFN4mwW3yC258Wgoa3xZwOsxR7eQ+bxKfP7J+hhPj/Tt
\r
129 7Vj5wP6bPojjSol+r15uaeFthSE5ZN56myQvvybUHMvGMvAgOT/0N8MS5UwOhmtW
\r
130 BRtvVs2kmCDrVKLYVdb8R5pp28ClF4yj9PlQkR5lE829t6fJnyu91w8aen5FZ7vw
\r
131 rqrgv5b8N931IxNEG3mcN5MH4lrohUVWWxenqyvqCJz1ijp3bjJIOszhqGv+oC6V
\r
132 5PVDaFP8oIjsmHjf4V/w0EzhTtzdg+7vXCTmQIxrBUhDwRudmAMCmyEhQAHFDzoY
\r
133 VxwZBaEbrYdoI4tkbW5gelfXS722gZa8CnmAEYQ7yKPOtTIgaEk1kP+sjTakNh1q
\r
134 sBHS8kezjwiAeH4BbqEOyo273f2vv1iI3z7od/tCDLF6k1miFXUURs+0qGsYglvs
\r
135 AX9yh3YgtxqQbaIT6w2LbB6djbshGTILBW27F6trm4ci6w7gkqxC5x0jo+b/X7YP
\r
136 PLFsWNT3UESGIV2BYsj4
\r
138 -----END PGP SIGNATURE-----
\r
140 --o6HUWsywbRjTg5uW--
\r