From d128b0f037b06d54abfc756b12c877cdf1575815 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 6 May 2016 07:33:25 +2100 Subject: [PATCH] Re: [PATCH v2] Use the Xapian::DB_RETRY_LOCK flag when available --- 82/da1f9663bb7d0afd67493c12e2ed3a354c63bf | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 82/da1f9663bb7d0afd67493c12e2ed3a354c63bf diff --git a/82/da1f9663bb7d0afd67493c12e2ed3a354c63bf b/82/da1f9663bb7d0afd67493c12e2ed3a354c63bf new file mode 100644 index 000000000..19133784f --- /dev/null +++ b/82/da1f9663bb7d0afd67493c12e2ed3a354c63bf @@ -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 D30186DE00F5 + for ; Thu, 5 May 2016 03:33:40 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.013 +X-Spam-Level: +X-Spam-Status: No, score=-0.013 tagged_above=-999 required=5 + tests=[AWL=-0.002, 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 NM8ES-NVB_J8 for ; + Thu, 5 May 2016 03:33:32 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 3E23E6DE00DF + for ; Thu, 5 May 2016 03:33:32 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1ayGav-0007Il-Qe; Thu, 05 May 2016 06:33:21 -0400 +Received: (nullmailer pid 3363 invoked by uid 1000); + Thu, 05 May 2016 10:33:25 -0000 +From: David Bremner +To: Istvan Marko , Jani Nikula , + notmuch@notmuchmail.org +Subject: Re: [PATCH v2] Use the Xapian::DB_RETRY_LOCK flag when available +In-Reply-To: +References: <87k2jbgl2b.fsf@nikula.org> + +User-Agent: Notmuch/0.21+99~gd93d377 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Thu, 05 May 2016 07:33:25 -0300 +Message-ID: <87futw6bgq.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +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: Thu, 05 May 2016 10:33:41 -0000 + +Istvan Marko writes: + +> Regarding tests, I couldn't think of a meaningful test for this. We get +> different behaviors depending on the Xapian version and if we try do +> some kind of a concurrent locking test we'd really be just testing +> Xapian's locking code rather than notmuch. + +We would be testing the build/configuration part to make sure we are +enabling the right flags, but more importantly testing the error +handling code, since we have to catch exceptions and pass them back +through the C library interface as error codes. One thing that would +make this easier to test is adding some finer grain errors than +"NOTMUCH_STATUS_XAPIAN_EXCEPTION" for notmuch_database_open_verbose to +return, to distinguish between the case of immediate failure and +timeout. Although it's not clear to me that Xapian actually provides a +timeout when DB_RETRY_LOCK is used. -- 2.26.2