From: Jani Nikula <jani@nikula.org>
To: Michal Nazarewicz <mina86@mina86.com>,
David Bremner <david@tethera.net>,
notmuch@notmuchmail.org
Subject: Re: ‘class Xapian::Database’ has no member named ‘close’
Date: Tue, 14 Aug 2012 14:57:13 +0200 [thread overview]
Message-ID: <87fw7p1viu.fsf@nikula.org> (raw)
In-Reply-To: <xa1tk3x1psm2.fsf@mina86.com>
On Tue, 14 Aug 2012, Michal Nazarewicz <mina86@mina86.com> wrote:
> Yeah, it seems that INSTALL claims “Notmuch will work best with Xapian
> 1.0.18 (or later) or Xapian 1.1.4 (or later)”, which doesn't seem to be
> the case.
>
> On top of that, configure does not seem to even check the version
> number.
Someone(tm) should fix both of the above.
> Is close() really required though? The comment justifies it saying
> that:
>
> Many Xapian objects hold references to the database, so merely
> deleting the database may not suffice to close it. Thus, we
> explicitly close it here.
>
> but wouldn't the database get closed when the last reference gets
> deleted anyway?
IIRC this was related to how closing is handled in the python
bindings. The close was introduced in the commit below, not too long
ago. I just reverted that one when I had to use notmuch with ancient
xapian (but the usual disclaimers apply).
BR,
Jani.
commit cfc5f1059aa16753cba610c41601cacc97260e08
Author: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Fri Mar 2 15:58:39 2012 +0100
Actually close the xapian database in notmuch_database_close
Formerly the xapian database object was deleted and closed in its
destructor once the object was garbage collected. Explicitly call
close() so that the database and the associated lock is released
immediately.
The comment is a courtesy of Austin Clements.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
next prev parent reply other threads:[~2012-08-14 12:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 15:23 ‘class Xapian::Database’ has no member named ‘close’ Michal Nazarewicz
2012-08-14 9:17 ` David Bremner
2012-08-14 12:26 ` Michal Nazarewicz
2012-08-14 12:57 ` Jani Nikula [this message]
2012-08-14 17:22 ` Justus Winter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fw7p1viu.fsf@nikula.org \
--to=jani@nikula.org \
--cc=david@tethera.net \
--cc=mina86@mina86.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).