‘class Xapian::Database’ has no member named ‘close’
Jani Nikula
jani at nikula.org
Tue Aug 14 05:57:13 PDT 2012
On Tue, 14 Aug 2012, Michal Nazarewicz <mina86 at 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 at 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 at informatik.uni-hamburg.de>
More information about the notmuch
mailing list