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