Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 5a / 0db377c15a53cdc2c4d1ea7c3819625dd38a27
1 Return-Path: <amdragon@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 8369B431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 28 Jan 2011 18:26:07 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.699\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
13         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id Vtetzsu4SZCO for <notmuch@notmuchmail.org>;\r
17         Fri, 28 Jan 2011 18:26:06 -0800 (PST)\r
18 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com\r
19         [209.85.216.181]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id B871F431FB5\r
22         for <notmuch@notmuchmail.org>; Fri, 28 Jan 2011 18:26:06 -0800 (PST)\r
23 Received: by qyk12 with SMTP id 12so4324326qyk.5\r
24         for <notmuch@notmuchmail.org>; Fri, 28 Jan 2011 18:26:04 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:mime-version:sender:in-reply-to:references:date\r
27         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
28         :content-transfer-encoding;\r
29         bh=fgyhyiZFYX3hwQuJe7TwbZ8rAneXDvg/AreyPZw6YNI=;\r
30         b=wVoKegsLkVFNtK48znWtWIm1fJrpcFAEKIySqXThuNOX8GWsfaEj2ZaJItinLQKwcA\r
31         z5YX+SAQgULjtoSpNQNjxKqftMUAov0oDY03ezSx/Lyvemr4Uat8B66i9qjoRu4+na1R\r
32         dYzFv8HB7wPDSZvT6vsYJn6pBzWlWcYfQeXtc=\r
33 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
34         h=mime-version:sender:in-reply-to:references:date\r
35         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
36         :content-transfer-encoding;\r
37         b=ByKjviTGQb6BMvp3oEMJGUnY4t19vXN/Lp106Y5BmNCPZDOFhIQMdDJsrJyQtdT9eC\r
38         /MPDFAaNBzNx4A69tX/dJdqZ1lFDviBzavxCz4N+CNfQsZT4S+TuU1DOpgnQVbIUIS4h\r
39         pO2CC2vFc5uT8t6A+eXIVZTSNIkyjJ5lMPs+8=\r
40 MIME-Version: 1.0\r
41 Received: by 10.229.90.200 with SMTP id j8mr841274qcm.268.1296267963686; Fri,\r
42         28 Jan 2011 18:26:03 -0800 (PST)\r
43 Sender: amdragon@gmail.com\r
44 Received: by 10.229.97.143 with HTTP; Fri, 28 Jan 2011 18:26:03 -0800 (PST)\r
45 In-Reply-To: <AANLkTinW_n+zMtLC-fy=naUGsAiFDwdd-mAqSWEDvF=W@mail.gmail.com>\r
46 References: <87d3nhe3g9.fsf@steelpick.2x.cz>\r
47         <AANLkTinW_n+zMtLC-fy=naUGsAiFDwdd-mAqSWEDvF=W@mail.gmail.com>\r
48 Date: Fri, 28 Jan 2011 21:26:03 -0500\r
49 X-Google-Sender-Auth: giVW8szFjjpLL7WMKLy9xO4d1lQ\r
50 Message-ID: <AANLkTinPph9Lj8h3UztQ74qMaaBVKkXB0rbiLeTX2GmW@mail.gmail.com>\r
51 Subject: Re: Xapian locking errors with custom query parser\r
52 From: Austin Clements <amdragon@mit.edu>\r
53 To: Michal Sojka <sojkam1@fel.cvut.cz>\r
54 Content-Type: text/plain; charset=ISO-8859-1\r
55 Content-Transfer-Encoding: quoted-printable\r
56 Cc: notmuch@notmuchmail.org\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Sat, 29 Jan 2011 02:26:07 -0000\r
70 \r
71 Looks like I managed to remove the line that deletes (and thus closes\r
72 and unlocks) the Xapian::Database object in a bout of overzealous code\r
73 removal.  The consequence was exactly what you suspected; there was a\r
74 brief window after notmuch had exited before the database actually got\r
75 unlocked.  Here's the fix.  cworth, what's the most convenient way for\r
76 me to slip this in to the patch series?\r
77 \r
78 diff --git a/lib/database.cc b/lib/database.cc\r
79 index 7253bdf..3c488a9 100644\r
80 --- a/lib/database.cc\r
81 +++ b/lib/database.cc\r
82 @@ -826,6 +826,7 @@ notmuch_database_close (notmuch_database_t *notmuch)\r
83      }\r
84 \r
85      delete notmuch->term_gen;\r
86 +    delete notmuch->xapian_db;\r
87      talloc_free (notmuch);\r
88  }\r
89 \r
90 \r
91 On Fri, Jan 28, 2011 at 11:35 AM, Austin Clements <amdragon@mit.edu> wrote:\r
92 > This should most definitely not happen. =A0I'll look in to it.\r
93 >\r
94 > On Fri, Jan 28, 2011 at 5:18 AM, Michal Sojka <sojkam1@fel.cvut.cz> wrote=\r
95 :\r
96 >>\r
97 >> Hi Austin,\r
98 >>\r
99 >> when I switched to using your custom query parser I started experiencing\r
100 >> "Unable to get write lock" errors when I run my initial tagging script.\r
101 >> I thought that this was because I run the script while processing the\r
102 >> mail in Emacs, but today I realized that this happens even without Emacs\r
103 >> and that it can be reproduced by a simple command below.\r
104 >>\r
105 >> i=3D0; while notmuch tag +xxx tag:whatever; do i=3D$((i+1)); echo $i; do=\r
106 ne\r
107 >>\r
108 >> It seems that sometimes the unlocking of the Xapian database happens\r
109 >> somewhat lazily and when the subsequent command starts I get:\r
110 >>\r
111 >> A Xapian exception occurred opening database: Unable to get write lock o=\r
112 n\r
113 >> /home/wsh/mail/.notmuch/xapian: already locked\r
114 >>\r
115 >> This happens almost regularly after a few iterations of the loop even if\r
116 >> the query doesn't match anything.\r
117 >>\r
118 >> Do you have an idea what may cause this?\r
119 >>\r
120 >> Can you reproduce this on your system?\r
121 >>\r
122 >> The version I use can be obtained from\r
123 >>\r
124 >> =A0git://rtime.felk.cvut.cz/notmuch.git custom-query-pasrser\r
125 >>\r
126 >> Thanks\r
127 >> -Michal\r
128 >> _______________________________________________\r
129 >> notmuch mailing list\r
130 >> notmuch@notmuchmail.org\r
131 >> http://notmuchmail.org/mailman/listinfo/notmuch\r
132 >\r
133 >\r