This should most definitely not happen.  I'll look in to it.<br><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 5:18 AM, Michal Sojka <span dir="ltr"><<a href="mailto:sojkam1@fel.cvut.cz">sojkam1@fel.cvut.cz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Austin,<br>
<br>
when I switched to using your custom query parser I started experiencing<br>
"Unable to get write lock" errors when I run my initial tagging script.<br>
I thought that this was because I run the script while processing the<br>
mail in Emacs, but today I realized that this happens even without Emacs<br>
and that it can be reproduced by a simple command below.<br>
<br>
i=0; while notmuch tag +xxx tag:whatever; do i=$((i+1)); echo $i; done<br>
<br>
It seems that sometimes the unlocking of the Xapian database happens<br>
somewhat lazily and when the subsequent command starts I get:<br>
<br>
A Xapian exception occurred opening database: Unable to get write lock on /home/wsh/mail/.notmuch/xapian: already locked<br>
<br>
This happens almost regularly after a few iterations of the loop even if<br>
the query doesn't match anything.<br>
<br>
Do you have an idea what may cause this?<br>
<br>
Can you reproduce this on your system?<br>
<br>
The version I use can be obtained from<br>
<br>
  git://<a href="http://rtime.felk.cvut.cz/notmuch.git" target="_blank">rtime.felk.cvut.cz/notmuch.git</a> custom-query-pasrser<br>
<br>
Thanks<br>
-Michal<br>
_______________________________________________<br>
notmuch mailing list<br>
<a href="mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a><br>
<a href="http://notmuchmail.org/mailman/listinfo/notmuch" target="_blank">http://notmuchmail.org/mailman/listinfo/notmuch</a><br>
</blockquote></div><br>