Re: [PATCH] lib: Simplify close and codify aborting atomic section
authorW. Trevor King <wking@tremily.us>
Mon, 22 Sep 2014 16:59:54 +0000 (09:59 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:04:41 +0000 (10:04 -0800)
1b/4fc1af8bc590afde0e7315068f48814fe4b3dd [new file with mode: 0644]

diff --git a/1b/4fc1af8bc590afde0e7315068f48814fe4b3dd b/1b/4fc1af8bc590afde0e7315068f48814fe4b3dd
new file mode 100644 (file)
index 0000000..ad9930b
--- /dev/null
@@ -0,0 +1,125 @@
+Return-Path: <wking@tremily.us>\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 2512F431FC0\r
+       for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 10:00:01 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.1\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       RCVD_IN_DNSWL_NONE=-0.0001] 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 LAbHfIG1WLmX for <notmuch@notmuchmail.org>;\r
+       Mon, 22 Sep 2014 09:59:57 -0700 (PDT)\r
+Received: from resqmta-po-05v.sys.comcast.net (resqmta-po-05v.sys.comcast.net\r
+       [96.114.154.164])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 29A9D431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 09:59:57 -0700 (PDT)\r
+Received: from resomta-po-08v.sys.comcast.net ([96.114.154.232])\r
+       by resqmta-po-05v.sys.comcast.net with comcast\r
+       id uGyT1o006516pyw01GzvlS; Mon, 22 Sep 2014 16:59:55 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by resomta-po-08v.sys.comcast.net with comcast\r
+       id uGzu1o00a152l3L01GzuA1; Mon, 22 Sep 2014 16:59:55 +0000\r
+Received: by odin.tremily.us (Postfix, from userid 1000)\r
+       id 6574A13A74B5; Mon, 22 Sep 2014 09:59:54 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
+       t=1411405194; bh=/IxcCaEY7mm7iOULiiwQDy7izpMnJDuHwvick5cS5B4=;\r
+       h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
+       b=O0aVxTmXaVsXtyz91gbJ+3ZToO4gaNooGyFRQZ2ZdnGupi9T8NsShaQ0ueGtQGTn5\r
+       3P2+nUGU6WyFI1iXZnInFxA80nOF0d7iLYRyPnJ3TCPoXxIqEyt6zPhMHrsNLviVXH\r
+       sDx6BC/9I54xzrEoBM4Uog0kliKwgy/PMBTN++wc=\r
+Date: Mon, 22 Sep 2014 09:59:54 -0700\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: Austin Clements <amdragon@mit.edu>\r
+Subject: Re: [PATCH] lib: Simplify close and codify aborting atomic section\r
+Message-ID: <20140922165954.GI20827@odin.tremily.us>\r
+References: <1411400615-20934-1-git-send-email-amdragon@mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha1;\r
+       protocol="application/pgp-signature"; boundary="zgY/UHCnsaNnNXRx"\r
+Content-Disposition: inline\r
+In-Reply-To: <1411400615-20934-1-git-send-email-amdragon@mit.edu>\r
+OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
+       url=http://tremily.us/pubkey.txt\r
+User-Agent: Mutt/1.5.23 (2014-03-12)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20140121; t=1411405195;\r
+       bh=2bO80aFKD78S5G4i+hKBP/ZqERuWDCPzP+ylWiXiBoU=;\r
+       h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
+       MIME-Version:Content-Type;\r
+       b=luaN6xdDIZyZmEGiW5ByHpmlR8W/JmkAq25OZ9GlWmtVbKHjmlggfAJJpFsIHwK09\r
+       vpRYTj4pRF+YgAucrB4YmKJF5TLvRrCYGadNTCXg+9BTI8JEtt/seFSa+xODCTWrxz\r
+       2H3Qt8Bg2F1iRwIu1fnkjcqBUsBinlCcRCIsQvc+G55zqptrYs7xg8zaMMTmDYYWzL\r
+       AsyXIlLr33XbrpM1BzKVpInZABYTSlSf0OTgT4tJlAJB2f+tpw1xnTsDJENFBYTyPZ\r
+       FDqG89JUg+AP/iqejOchJZPD7g/s5xZ7YY0REldkDhTTNKLxDubmekVk17NcO/TnDf\r
+       p2CvaoIgyEhnQ==\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: Mon, 22 Sep 2014 17:00:01 -0000\r
+\r
+\r
+--zgY/UHCnsaNnNXRx\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Mon, Sep 22, 2014 at 11:43:35AM -0400, Austin Clements wrote:\r
+> This patch simplifies notmuch_database_close to just call\r
+> Database::close.  This works for both read-only and read/write\r
+> databases, takes care of committing changes, unifies the exception\r
+> handling path, and codifies aborting outstanding transactions.\r
+\r
+If we're dropping the flush call here, where will it be triggered\r
+instead?  We'll need to flush/commit our changes to the database at\r
+some point before closing.  Do clients now need an explicit\r
+flush/commit command (explicit, client-initiated flushes sound like a\r
+good idea to me).\r
+\r
+Cheers,\r
+Trevor\r
+\r
+--=20\r
+This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
+For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
+\r
+--zgY/UHCnsaNnNXRx\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: OpenPGP digital signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2\r
+\r
+iQIcBAEBAgAGBQJUIFWJAAoJEG8/JgBt8ol8cAkP/jGJGVE54E2keqkqx1uevBic\r
+Zb/RQMyr7uC88m9qLKl6PQpnEhHYcRZzGxl4W6nYv58T08+nqb0n1mLDdim0Elsf\r
+0BiVo8ou6p6u2NEJzpsyN9n7ZeDujzv0AzaBk/Nof++ZskHU+jxg6QLE8UMbYYKK\r
+xC+OBtEaNYmyDjdmNU7/sSQVW6E6y2q1WiWDgsRoX7nJxCA7UVR0tVT2I4t9Dg+M\r
+tUUyhnvivRKligUIM/Bqhvtbnh951y9BLWfCMfErqnmK3Q70GvN8nmlljJ83aTHT\r
+qrKuGr+uUqQt6qd2KVbEsrw3BmdzRLxCUsmQhQHFfvCh5Dvdi06LkqAheBB72BXV\r
+rHCZnefeJz75N1DF6ZLh13A/WfJDIqp7kwoHA1aaTI6QsLApXxHhMFe/n4cMCkOz\r
+b/sUI6K4/WgECLcp3vIDDvcjFpxDOapzPZYitdO3ljScsOBIwsRLF5h1+GsLZHFT\r
+jiUXlP4+sCkQD24Oi4RKYMKu43DZ1D6MirE9eYf+QlKb8ilUi3/cMxSb2uBTbRV1\r
+iI7YesYfViOKLT6Gp9hlEaKKlkPJ5SogFA4bpJSkwVEXJSibzx0af/p13yXrOUMh\r
+hG1nDY8A1/gd4okABLJ/+73QlQb2RYFkOFqWUrKBca7akLyVdOBZDqJ00LnFPsmW\r
+05U/jwDZI1rCzawoPH30\r
+=lmZL\r
+-----END PGP SIGNATURE-----\r
+\r
+--zgY/UHCnsaNnNXRx--\r