[Xapian-discuss] Best Practices for Compaction?
Richard Boulton
richard at tartarus.org
Fri Sep 18 14:47:53 BST 2009
2009/9/18 Arjen van der Meijden <acmmailing at tweakers.net>
> Hi Ken,
>
> We're only updating the database in intervals, not continuously.
> What we're doing is basically:
> [symlink for the database is to compacted database]
> update "working" database
> change symlink for database to "working"
> compact working to a new compact database
> change symlink for database back to compact
>
I recommend using a stub-database file instead of a symlink - that way, if a
reader has opened some of the database files but not others when the symlink
changes, you don't get an inconsistent set of database files being opened.
There's a variety of swapping schemes like this: I've used various different
schemes, depending on what requirements for updating speed and search speed
I'm trying to satisfy.
--
Richard
More information about the Xapian-discuss
mailing list