unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* fix notmuch_database_close
@ 2012-02-29  9:19 Justus Winter
  2012-02-29  9:19 ` [PATCH] Actually close the xapian database in notmuch_database_close Justus Winter
  0 siblings, 1 reply; 10+ messages in thread
From: Justus Winter @ 2012-02-29  9:19 UTC (permalink / raw)
  To: notmuch

Pazz mentioned a problem wrt reopening a notmuch database immediately
after it has been closed. The problem can be reproduced with this test
case:

~~~ snip ~~~
import os
import notmuch

db_path = os.path.expanduser('~/Maildir')

for i in range(2):
    with notmuch.Database(db_path, mode=notmuch.Database.MODE.READ_WRITE) as db:
        query = db.create_query('tag:inbox AND NOT tag:killed')
        print(len(list(query.search_messages())))
~~~ snap ~~~

Without this fix, the second loop iteration fails because the xapian
lock is not released in time.

Cheers,
Justus

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-03 16:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-29  9:19 fix notmuch_database_close Justus Winter
2012-02-29  9:19 ` [PATCH] Actually close the xapian database in notmuch_database_close Justus Winter
2012-02-29 15:48   ` Austin Clements
2012-02-29 21:19     ` Olly Betts
2012-02-29 22:17       ` Austin Clements
2012-03-01  6:59         ` Justus Winter
2012-03-01 18:11           ` Austin Clements
2012-03-02 14:58             ` Justus Winter
2012-03-03 16:18               ` David Bremner
2012-03-01 21:20           ` Olly Betts

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).