[Xapian-devel] Xapian::Database->close() for perl missing

Websuche :: Felix Ostmann ostmann at websuche.de
Thu Apr 19 14:45:36 BST 2012


I have a xapian-daemon, which can be queried via http. A background-process
generated every hour one new index and then remove and create a new symlink
to the current database.

/path/to/index/20120419010000
/path/to/index/20120419020000
/path/to/index/20120419030000
/path/to/index/default => /path/to/index/20120419030000

So the daemon only check the mtime of /path/to/index/default/iamchert befor
every request and if it is a new one, he close/reopen the database.

The problem is: There is no ->close in perl for a database! So currently i
override the object. After some days, the prozess have many open
filepointers to allready removed databases.

I also tried ->reopen, but xapian dont reopen every file, so after reopen,
i have some files opened from the old database and the record.DB from the
new one. Also the filepointer to the old record.DB still exists (i tested
with lsof -p $PID).

So what is the right way to make a clean shutdown of a opened xapian
database?

I tested with xapian-core 1.2.9 / Search::Xapian 1.2.9.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20120419/dd5c30cb/attachment.htm>


More information about the Xapian-devel mailing list