--- /dev/null
+Return-Path: <david@tethera.net>\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 AE8766DE01F7\r
+ for <notmuch@notmuchmail.org>; Tue, 3 May 2016 12:01:58 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.013\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.013 tagged_above=-999 required=5\r
+ tests=[AWL=-0.002, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ 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 AIz00ZAChx2m for <notmuch@notmuchmail.org>;\r
+ Tue, 3 May 2016 12:01:50 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 25F146DE00DF\r
+ for <notmuch@notmuchmail.org>; Tue, 3 May 2016 12:01:50 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1axfZl-0004OQ-GZ; Tue, 03 May 2016 15:01:41 -0400\r
+Received: (nullmailer pid 17899 invoked by uid 1000);\r
+ Tue, 03 May 2016 19:01:44 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Istvan Marko <notmuch@kismala.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] Use the Xapian::DB_RETRY_LOCK flag when available\r
+In-Reply-To: <m38tzr2n6v.fsf@zsu.kismala.com>\r
+References: <m38tzr2n6v.fsf@zsu.kismala.com>\r
+User-Agent: Notmuch/0.21+99~gd93d377 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Tue, 03 May 2016 16:01:44 -0300\r
+Message-ID: <8760uv6k4n.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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: Tue, 03 May 2016 19:01:58 -0000\r
+\r
+Istvan Marko <notmuch@kismala.com> writes:\r
+\r
+> Xapian 1.3 has introduced the DB_RETRY_LOCK flag (Xapian bug\r
+> 275). Detect it in configure and use it if available. With this flag\r
+> commands that need the write lock will wait for their turn instead of\r
+> aborting when it's not immediately available.\r
+> ---\r
+> configure | 25 ++++++++++++++++++++++++-\r
+> lib/database.cc | 5 +++++\r
+> 2 files changed, 29 insertions(+), 1 deletion(-)\r
+>\r
+> diff --git a/configure b/configure\r
+> index 6231d2b..0c1d5bc 100755\r
+> --- a/configure\r
+> +++ b/configure\r
+> @@ -371,6 +371,21 @@ if [ ${have_xapian} = "1" ]; then\r
+> esac\r
+> fi\r
+> \r
+> +# DB_RETRY_LOCK is only supported on Xapian > 1.3.2\r
+> +have_xapian_db_retry_lock=0\r
+> +if [ ${have_xapian} = "1" ]; then\r
+> + printf "Checking for Xapian lock retry support... "\r
+> + case "${xapian_version}" in\r
+> + 0.*|1.[012].*|1.3.[0-2])\r
+> + printf "No (only available with Xapian > 1.3.2).\n" ;;\r
+> + [1-9]*.[0-9]*.[0-9]*)\r
+> + have_xapian_db_retry_lock=1\r
+> + printf "Yes.\n" ;;\r
+> + *)\r
+> + printf "Unknown version.\n" ;;\r
+> + esac\r
+> +fi\r
+\r
+First, thanks for writing the patch. I'd completely forgotten about this\r
+feature, and it's something pretty important for many notmuch users. I\r
+saw you got some good feedback from Jani. As a less urgent comment, what\r
+about writing the test in the style of\r
+\r
+ http://article.gmane.org/gmane.mail.notmuch.general/22329\r
+\r
+I don't know if there's complete concensus on this, but I personally\r
+much prefer testing features to versions when possible.\r
+\r
+d\r
+\r
+\r