From a2db8a02fe7898fe33791efe757d4f2a3844bc0a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 5 Jun 2016 09:29:12 +2100 Subject: [PATCH] v3 of DB_RETRY_LOCK --- 91/b6bbeff581b230fe788e9fe87d77af6e8384d7 | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 91/b6bbeff581b230fe788e9fe87d77af6e8384d7 diff --git a/91/b6bbeff581b230fe788e9fe87d77af6e8384d7 b/91/b6bbeff581b230fe788e9fe87d77af6e8384d7 new file mode 100644 index 000000000..9c05f1998 --- /dev/null +++ b/91/b6bbeff581b230fe788e9fe87d77af6e8384d7 @@ -0,0 +1,68 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id EEABA6DE02C9 + for ; Sat, 4 Jun 2016 05:29:50 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.012 +X-Spam-Level: +X-Spam-Status: No, score=-0.012 tagged_above=-999 required=5 + tests=[AWL=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id az5P6-un_Ica for ; + Sat, 4 Jun 2016 05:29:42 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 858676DE0243 + for ; Sat, 4 Jun 2016 05:29:34 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1b9AhZ-0004yX-Po; Sat, 04 Jun 2016 08:29:17 -0400 +Received: (nullmailer pid 23488 invoked by uid 1000); + Sat, 04 Jun 2016 12:29:27 -0000 +From: David Bremner +To: Istvan Marko , Jani Nikula , + notmuch@notmuchmail.org +Subject: v3 of DB_RETRY_LOCK +Date: Sat, 4 Jun 2016 09:29:12 -0300 +Message-Id: <1465043356-23420-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.8.1 +In-Reply-To: +References: +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 04 Jun 2016 12:29:51 -0000 + +[PATCH 1/4] Use the Xapian::DB_RETRY_LOCK flag when available + +This is the original patch, rebased on master. I took the liberty of +converting the configure test to a test compile. + +[PATCH 2/4] test: factor out some boilerplate from C tests +[PATCH 3/4] test: initial tests for locking retry + +Add a simple test of locking retry. + +[PATCH 4/4] lib: add built_with handling for XAPIAN_DB_RETRY_LOCK + +Make it visible to the user whether their notmuch supports locking +retry (blocking open). + +The remaining question for me is if we are happy with defaulting to +blocking (w/o timeout) on open. I'm not sure how you could deadlock +without writing C code, but it's pretty easy with fork. As I +discovered writing my test case. + -- 2.26.2