--- /dev/null
+Return-Path: <stebalien@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 5A7F26DE15DC\r
+ for <notmuch@notmuchmail.org>; Sun, 25 Oct 2015 14:02:27 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.681\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.681 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
+ RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001,\r
+ T_FREEMAIL_FORGED_FROMDOMAIN=0.01,\r
+ T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id UsXHT5xb54uT for <notmuch@notmuchmail.org>;\r
+ Sun, 25 Oct 2015 14:02:24 -0700 (PDT)\r
+Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com\r
+ [209.85.160.171])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 086986DE1585\r
+ for <notmuch@notmuchmail.org>; Sun, 25 Oct 2015 14:02:24 -0700 (PDT)\r
+Received: by ykdr3 with SMTP id r3so166225054ykd.1\r
+ for <notmuch@notmuchmail.org>; Sun, 25 Oct 2015 14:02:22 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=sender:date:from:to:subject:message-id:mime-version:content-type\r
+ :content-disposition:phone:user-agent;\r
+ bh=bcvY5qV4kdmK9HvLn0bXpIYqCLb2VLIL9ZW+KnKjDZY=;\r
+ b=TFbJPFeJ2NhhbXGVNwix7DGPYboNdf1V/jr26qLjfimwz1G3FzuRiaxeNkgV5ZKq1V\r
+ nnyLjsuHN72UydrjaBO5OCWVazqO/0my8KZArJGiMYU6826JBpw6Ojf2dJ+dOr5rTbXZ\r
+ UqWa7LCggKvygQ/lI+bwAWNP0vcAg8EreW6P9nvZ7si8By6iYPdpNi9ot2U6IXIJZjfZ\r
+ PEgfjuH/c7BcZKve2dVwG+o3bOyYoowYoH9hMHAhQa/pKnaYfzaKSUiQ1mosZ5+UF8+n\r
+ eIsSrgo7qG97jM71Zo37TpKk1m0yLmn8KaRcdx+IkpUp5QR1jaEFn2IVxnWkqoOJOA7i\r
+ r8gg==\r
+X-Received: by 10.13.241.135 with SMTP id a129mr23111341ywf.325.1445806940965;\r
+ Sun, 25 Oct 2015 14:02:20 -0700 (PDT)\r
+Received: from localhost (pool-71-174-176-247.bstnma.east.verizon.net.\r
+ [71.174.176.247])\r
+ by smtp.gmail.com with ESMTPSA id r185sm5978967ywg.26.2015.10.25.14.02.19\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sun, 25 Oct 2015 14:02:20 -0700 (PDT)\r
+Sender: Steven <stebalien@gmail.com>\r
+Date: Sun, 25 Oct 2015 17:02:15 -0400\r
+From: Steven Allen <steven@stebalien.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [bug] notmuch doesn't commit changes before an open transaction on\r
+ close\r
+Message-ID: <20151025210215.GA3754@stebalien.com>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha256;\r
+ protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn"\r
+Content-Disposition: inline\r
+Phone: +1-310-433-5865\r
+X-PGP-Key: https://stebalien.com/assets/media/uploads/key.pgp\r
+X-PGP-Fingerprint: 327B 20CE 21EA 68CF A774 8675 7C92 3221 5899 410C\r
+User-Agent: Mutt/1.5.23.1 (2014-03-12)\r
+X-Mailman-Approved-At: Sun, 25 Oct 2015 14:07:00 -0700\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 25 Oct 2015 21:02:27 -0000\r
+\r
+\r
+--x+6KMIRAuhnl3hBn\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+Notmuch claims to commit changes made before an open transaction on\r
+close but actually throws them away (according to the documentation).\r
+\r
+According to the notmuch documentation,\r
+\r
+> For writable databases, notmuch_database_close commits all changes\r
+> to disk before closing the database. If the caller is currently in\r
+> an atomic section (there was a notmuch_database_begin_atomic\r
+> without a matching notmuch_database_end_atomic), this will discard\r
+> changes made in that atomic section (but still commit changes made\r
+> prior to entering the atomic section).\r
+\r
+However, this isn't true. Notmuch atomic transactions don't flush on\r
+entry so, this comment from the xapian documentation applies:\r
+\r
+> If you're applying atomic groups of changes and only wish to ensure\r
+> that each group is either applied or not applied, then you can prevent\r
+> the automatic commit() before and after the transaction by starting\r
+> the transaction with begin_transaction(false). However, if\r
+> cancel_transaction is called (or if commit_transaction isn't called\r
+> before the WritableDatabase object is destroyed) then any changes\r
+> which were pending before the transaction began will also be\r
+> discarded.\r
+\r
+source: http://xapian.org/docs/apidoc/html/classXapian_1_1WritableDatabase.=\r
+html\r
+\r
+This means that, in theory at least, xapian could throw away *all*\r
+changes to the database if a transaction is open.\r
+\r
+--=20\r
+Steven Allen\r
+(310) 433-5865\r
+((Do Not Email <honeypot@stebalien.com>))\r
+\r
+--x+6KMIRAuhnl3hBn\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2\r
+\r
+iQIcBAEBCAAGBQJWLUNUAAoJEGVqlrqQ0li+dg0QAKDqTok9X+n7hZ51dSoss861\r
+GzhJ1HmE0ikcSDiMzMWT6tUkjKf+WdVl/abXliZZdMnccJGEr3kB5uakt+3HybBN\r
+s3hLZdKjDhFLatdFdDUJzOHWI3nJENXT614lb3RhCjGK6fiyloQ543sDPxT3PQ+D\r
+PGknZ3LZI54R/L93hEdR1OCBcMSNRw5+7tmEfrHj+P12duYcgL5Nj9XY+wv9GqYY\r
+WA/58qEeDVlKkt7K4zTkw8Chrzb58o0whrqJGojw+5eTOA1MUA7/wkcfb1nsEW87\r
+eRRc+KjgzFclEdE/XYwkdIqFhuurB4KflLo5f1k9Py2O7qPeQssru9RDcdjFACB+\r
+w7CEKvHvo6RX+j+Vq1h25fXxG3bogOfp08AlTJFZLp75KNRjGdS1frvgaF1ufhZq\r
+1aTxKbnXo+OTRhriMFWS7P94410Sm7cbhCe7IJJbpu3LFi2ZLkT7jwOgSB+Oj7HQ\r
+CJtLgyJsRBjrfTmexV3aUU94NhNJGfFj6R7GueckjNdPcH/MVIu52cQxfSLo7DTg\r
+waReepRIc5xdjRwXI+xr0xjtlnNbFOz2fQVe1/RSxvsLb5elEeTAINjMZ7WF9hOe\r
+bWjsLEB+CyPmDT5mxfvFSdWtN385S4foWWsnvhqCz1+gc22ZRQLwWqUOQKFayH0Q\r
+STSUYWPnPA+mOq2+lTQv\r
+=q6/j\r
+-----END PGP SIGNATURE-----\r
+\r
+--x+6KMIRAuhnl3hBn--\r