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.