From: Maarten Aertsen Date: Fri, 6 Jun 2014 08:03:54 +0000 (+0200) Subject: notmuch dump: taking write-lock to protect from concurrent (cronned) notmuch new? X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=83a653de5a6e662e88ce58131f0d3d56727304fe;p=notmuch-archives.git notmuch dump: taking write-lock to protect from concurrent (cronned) notmuch new? --- diff --git a/1c/f61a17c7ac5e91e22fd26c84e1df448b5f1808 b/1c/f61a17c7ac5e91e22fd26c84e1df448b5f1808 new file mode 100644 index 000000000..75bf5d271 --- /dev/null +++ b/1c/f61a17c7ac5e91e22fd26c84e1df448b5f1808 @@ -0,0 +1,75 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1B97740DBDE + for ; Fri, 6 Jun 2014 01:24:47 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id c-mP2O9Zg8KF for ; + Fri, 6 Jun 2014 01:24:43 -0700 (PDT) +X-Greylist: delayed 1245 seconds by postgrey-1.32 at olra; + Fri, 06 Jun 2014 01:24:43 PDT +Received: from kardo.rtsn.nl (rtsn.nl [217.119.226.124]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 121F040DBDA + for ; Fri, 6 Jun 2014 01:24:43 -0700 (PDT) +Received: from sagi by kardo.rtsn.nl with local (Exim 4.80) + (envelope-from ) id 1Wsp7y-0008K0-Pm + for notmuch@notmuchmail.org; Fri, 06 Jun 2014 10:03:54 +0200 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +To: notmuch@notmuchmail.org +Message-ID: <20140606080354.28047.77393@kardo.rtsn.nl> +From: Maarten Aertsen +User-Agent: alot/0.3.5 +Subject: notmuch dump: taking write-lock to protect from concurrent (cronned) + notmuch new? +Date: Fri, 06 Jun 2014 10:03:54 +0200 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Fri, 06 Jun 2014 08:24:47 -0000 + +Hi everyone, + +(summary of IRC-conversation just now) +I did: + - run notmuch new (and afew -t) in cron, every two minutes + - run notmuch dump in cron, every 12 hours + +I expected: + - notmuch dump to complete, possibly causing notmuch new to fail in the m= +eantime + +I observed: + - notmuch dump terminating with: +"terminate called after throwing an instance of 'Xapian::DatabaseModifiedEr= +ror'" + +mjw1009 suggested to change NOTMUCH_DATABASE_MODE_READ_ONLY on line +215 of notmuch-dump.c to NOTMUCH_DATABASE_MODE_READ_WRITE + +I'm wondering if this hits enough people to motivate the addition of a +command line switch (or perhaps even a change in default behaviour?) + +Thanks for writing this software. + +best regards, Maarten