Xapian locking errors with custom query parser
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 28 Jan 2011 10:18:46 +0000 (11:18 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:48 +0000 (09:37 -0800)
2c/a2c6f3923c87c5a21fae91c3ff16ffb83b5042 [new file with mode: 0644]

diff --git a/2c/a2c6f3923c87c5a21fae91c3ff16ffb83b5042 b/2c/a2c6f3923c87c5a21fae91c3ff16ffb83b5042
new file mode 100644 (file)
index 0000000..8d46637
--- /dev/null
@@ -0,0 +1,89 @@
+Return-Path: <sojkam1@fel.cvut.cz>\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 3CBD8431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Jan 2011 02:18:52 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 xX2jyeJYkMdb for <notmuch@notmuchmail.org>;\r
+       Fri, 28 Jan 2011 02:18:50 -0800 (PST)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1B397431FB5\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Jan 2011 02:18:50 -0800 (PST)\r
+Received: from localhost (unknown [192.168.200.4])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 1253119F3316;\r
+       Fri, 28 Jan 2011 11:18:49 +0100 (CET)\r
+X-Virus-Scanned: IMAP AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+       by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
+       port 10044)\r
+       with ESMTP id OAh27e6I705U; Fri, 28 Jan 2011 11:18:47 +0100 (CET)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 7D14519F3305;\r
+       Fri, 28 Jan 2011 11:18:47 +0100 (CET)\r
+Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30])\r
+       (Authenticated sender: sojkam1)\r
+       by imap.feld.cvut.cz (Postfix) with ESMTPSA id 4C6A915C031;\r
+       Fri, 28 Jan 2011 11:18:47 +0100 (CET)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.72)\r
+       (envelope-from <sojkam1@fel.cvut.cz>)\r
+       id 1PilPj-0003Hh-09; Fri, 28 Jan 2011 11:18:47 +0100\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: notmuch@notmuchmail.org\r
+Subject: Xapian locking errors with custom query parser\r
+User-Agent: Notmuch/0.5-87-g9705d00 (http://notmuchmail.org) Emacs/23.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Fri, 28 Jan 2011 11:18:46 +0100\r
+Message-ID: <87d3nhe3g9.fsf@steelpick.2x.cz>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: Austin Clements <amdragon@mit.edu>\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, 28 Jan 2011 10:18:52 -0000\r
+\r
+Hi Austin,\r
+\r
+when I switched to using your custom query parser I started experiencing\r
+"Unable to get write lock" errors when I run my initial tagging script.\r
+I thought that this was because I run the script while processing the\r
+mail in Emacs, but today I realized that this happens even without Emacs\r
+and that it can be reproduced by a simple command below.\r
+\r
+i=0; while notmuch tag +xxx tag:whatever; do i=$((i+1)); echo $i; done\r
+\r
+It seems that sometimes the unlocking of the Xapian database happens\r
+somewhat lazily and when the subsequent command starts I get:\r
+\r
+A Xapian exception occurred opening database: Unable to get write lock on /home/wsh/mail/.notmuch/xapian: already locked\r
+\r
+This happens almost regularly after a few iterations of the loop even if\r
+the query doesn't match anything. \r
+\r
+Do you have an idea what may cause this?\r
+\r
+Can you reproduce this on your system?\r
+\r
+The version I use can be obtained from\r
+\r
+  git://rtime.felk.cvut.cz/notmuch.git custom-query-pasrser\r
+\r
+Thanks\r
+-Michal\r