[Xapian-devel] Xapian::Database->close() for perl missing
Olly Betts
olly at survex.com
Mon Apr 23 10:32:07 BST 2012
On Mon, Apr 23, 2012 at 11:23:18AM +0200, Websuche :: Felix Ostmann wrote:
> - create a new database ( /path/to/databases/xapian-index-3 )
> - create a new stub-file in the database directory with absolute file names
> and without symlinks ( /path/to/databases/xapian-index-3/stub )
> - delete and create a default-database symlink to this database (
> /path/to/databases/default => /path/to/databases/xapian-index-3 )
> - check befor every request the modtime of the stub-file in the
> default-database and if newer close / open the database via stub-file
You don't really want the symlink at all. Just make
/path/to/databases/default a stub file, and update like so:
- create a new database ( /path/to/databases/xapian-index-3 )
- create a new stub-file /path/to/databases/default.tmp containing:
auto /path/to/databases/xapian-index-3
- atomically update:
mv /path/to/databases/default.tmp /path/to/databases/default
And for your use:
- check before every request the modtime of /path/to/databases/default
and if newer close / open the database via stub-file
Cheers,
Olly
More information about the Xapian-devel
mailing list