From: Matt Armstrong Date: Tue, 2 Aug 2016 22:46:39 +0000 (+1700) Subject: Re: A systematic way of handling Xapian lock errors? X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3e08777cbc5d8785d492aca6ed22ea1f34729b45;p=notmuch-archives.git Re: A systematic way of handling Xapian lock errors? --- diff --git a/75/01a21c8b147ed361a13d65ef6dcc475ebef8a8 b/75/01a21c8b147ed361a13d65ef6dcc475ebef8a8 new file mode 100644 index 000000000..bf103a2bb --- /dev/null +++ b/75/01a21c8b147ed361a13d65ef6dcc475ebef8a8 @@ -0,0 +1,99 @@ +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 D2C5F6DE00BD + for ; Tue, 2 Aug 2016 15:46:52 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.909 +X-Spam-Level: +X-Spam-Status: No, score=-0.909 tagged_above=-999 required=5 tests=[AWL=0.113, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.211, 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 xX8H2KOFSCh7 for ; + Tue, 2 Aug 2016 15:46:45 -0700 (PDT) +Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com + [209.85.192.181]) + by arlo.cworth.org (Postfix) with ESMTPS id 1CF3C6DE00B8 + for ; Tue, 2 Aug 2016 15:46:45 -0700 (PDT) +Received: by mail-pf0-f181.google.com with SMTP id y134so70485023pfg.0 + for ; Tue, 02 Aug 2016 15:46:45 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; + s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version; bh=P8R4n9ZbHaQPC27j+h0mz8/Xw/+GoC+jqHw9Ww6NLnQ=; + b=Qwd8hNGfPS2XxL2J4pWMxDKPvl1YcDZHWUHo2dnyzukG4bJoWtMEO5PBbH6/Usxbs3 + 5/poC2p9ieXypsDVAqKb1kdMkqZmgkUEU2su5/8yeVtyw6wU/OHm3wZ4yevA5iGIkIJ1 + 9HPP15F18sBN3x42N2AsOP+0QAUyAfMGGlAQsAMw05odNl4dT2vcnKGVR1G2diTGgGlp + 6lUfERVTJ5zoGEAy4CuFqR/2WK1Yurz768xUIB2uBYJg8sKGxvc7eib/EnB2Hn8Y2gyW + TpS2Npt8kilNDiKb7bw5K4D9pWuzgvLjGNSvrFiy7lJMjhoqqZLM/h73kZcGnznsJA82 wbmQ== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:in-reply-to:references + :user-agent:date:message-id:mime-version; + bh=P8R4n9ZbHaQPC27j+h0mz8/Xw/+GoC+jqHw9Ww6NLnQ=; + b=EzaSvwK6BcFJTaAAgd8sMABaJQxZ3dcVEeDeOBpYkNQVsxoajOvAAyK+hmKt/lHO4h + FrjFIHJ4faQbN3IoDyPg9+V7YgJrXsQFeQiHsmGvav8Yopb8w3n9wmemXsewMJmc13i+ + iE4Xw+96GbTobJGIUern/BwUx2WJ9vbKcsTHpzWCS6S9ZTBYb0FBmsi5NwCCHmMxy/lJ + QYwtMCGmBsQqt/BHzQZBCoQFSMkdjBdk0SvE3v0zql69YD/7YvzxQkeZTMsVbKkuMUwf + MB7PdJennP2Dh+QkxU2G7Gd/3QHyxz2JAESbyIDGTskdlhOIB5FteznQwgGCRYBUs/5b + k67w== +X-Gm-Message-State: + AEkoouukgSB2yXk8tntGnlIG1NDeirMwVV1oTypY72NtB1xzSUHls8wCWrXoR39F83jxR39R +X-Received: by 10.98.192.12 with SMTP id x12mr109098438pff.54.1470178004310; + Tue, 02 Aug 2016 15:46:44 -0700 (PDT) +Received: from marmstrong-linux.kir.corp.google.com + ([2620:0:1008:1101:419b:e62d:4938:a6b6]) + by smtp.gmail.com with ESMTPSA id wp4sm7241540pab.15.2016.08.02.15.46.42 + (version=TLS1_2 cipher=AES128-SHA bits=128/128); + Tue, 02 Aug 2016 15:46:43 -0700 (PDT) +From: Matt Armstrong +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: A systematic way of handling Xapian lock errors? +In-Reply-To: <87lh0evmk9.fsf@maritornes.cs.unb.ca> +References: + <87lh0evmk9.fsf@maritornes.cs.unb.ca> +User-Agent: Notmuch/0.21 (https://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Tue, 02 Aug 2016 15:46:39 -0700 +Message-ID: +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: Tue, 02 Aug 2016 22:46:52 -0000 + +David Bremner writes: + +> Matt Armstrong writes: +> +> +>> To address both, has something like this ever been considered: +>> +>> notmuch --lock_timeout COMMAND ARG... +>> +>> Then frontends like Emacs could lean on retry logic written in C. If +>> this seems workable, it is something I can try implementing. +> +> notmuch in git master uses xapians lock retry if present (xapian +> 1.3+). Currently there is no timeout, but Olly seemed receptive to the +> idea of adding one, so I'd suggest that's the right place to work on +> improving this. You may find that just having unbounded lock retries +> (i.e. blocking opens) is enough for your issues. + +Ah great. I am still on Xapian 1.2 by way of running a relatively old +Linux distro. Building a personal version of Xapian as we speak...