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.<div><br></div><div>/path/to/index/20120419010000</div>
<div>/path/to/index/20120419020000</div><div>/path/to/index/20120419030000</div><div>/path/to/index/default =&gt; /path/to/index/20120419030000</div><div><br></div><div>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.</div>
<div><br></div><div>The problem is: There is no -&gt;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.</div><div><br>
</div><div>I also tried -&gt;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).</div>
<div><br></div><div>So what is the right way to make a clean shutdown of a opened xapian database?<br clear="all"><div><br></div><div>I tested with xapian-core 1.2.9 / Search::Xapian 1.2.9.0</div><div><br></div>
</div>