v3 of DB_RETRY_LOCK
authorDavid Bremner <david@tethera.net>
Sat, 4 Jun 2016 12:29:12 +0000 (09:29 +2100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:57 +0000 (16:21 -0700)
91/b6bbeff581b230fe788e9fe87d77af6e8384d7 [new file with mode: 0644]

diff --git a/91/b6bbeff581b230fe788e9fe87d77af6e8384d7 b/91/b6bbeff581b230fe788e9fe87d77af6e8384d7
new file mode 100644 (file)
index 0000000..9c05f19
--- /dev/null
@@ -0,0 +1,68 @@
+Return-Path: <bremner@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 EEABA6DE02C9\r
+ for <notmuch@notmuchmail.org>; Sat,  4 Jun 2016 05:29:50 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.012\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.012 tagged_above=-999 required=5\r
+ tests=[AWL=-0.001, 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 az5P6-un_Ica for <notmuch@notmuchmail.org>;\r
+ Sat,  4 Jun 2016 05:29:42 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 858676DE0243\r
+ for <notmuch@notmuchmail.org>; Sat,  4 Jun 2016 05:29:34 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1b9AhZ-0004yX-Po; Sat, 04 Jun 2016 08:29:17 -0400\r
+Received: (nullmailer pid 23488 invoked by uid 1000);\r
+ Sat, 04 Jun 2016 12:29:27 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Istvan Marko <notmuch@kismala.com>, Jani Nikula <jani@nikula.org>,\r
+ notmuch@notmuchmail.org\r
+Subject: v3 of DB_RETRY_LOCK\r
+Date: Sat,  4 Jun 2016 09:29:12 -0300\r
+Message-Id: <1465043356-23420-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.8.1\r
+In-Reply-To: <m3wpnb0xc6.fsf@zsu.kismala.com>\r
+References: <m3wpnb0xc6.fsf@zsu.kismala.com>\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: Sat, 04 Jun 2016 12:29:51 -0000\r
+\r
+[PATCH 1/4] Use the Xapian::DB_RETRY_LOCK flag when available\r
+\r
+This is the original patch, rebased on master. I took the liberty of\r
+converting the configure test to a test compile.\r
+\r
+[PATCH 2/4] test: factor out some boilerplate from C tests\r
+[PATCH 3/4] test: initial tests for locking retry\r
+\r
+Add a simple test of locking retry.\r
+\r
+[PATCH 4/4] lib: add built_with handling for XAPIAN_DB_RETRY_LOCK\r
+\r
+Make it visible to the user whether their notmuch supports locking\r
+retry (blocking open).\r
+\r
+The remaining question for me is if we are happy with defaulting to\r
+blocking (w/o timeout) on open. I'm not sure how you could deadlock\r
+without writing C code, but it's pretty easy with fork. As I\r
+discovered writing my test case.\r
+\r