[Xapian-discuss] Multiple databases vs Single large database
Olly Betts
olly at survex.com
Sun Nov 30 20:50:29 GMT 2008
Please don't top-post.
On Mon, Nov 24, 2008 at 06:23:51AM +0100, Felix Antonius Wilhelm Ostmann wrote:
> Olly Betts schrieb:
> > This leaves a time interval where there's no valid database at C though,
> > which is problematic if search process are could be trying to open the
> > database while you're switch the new database live.
> >
> > A better approach is to use a stub database file for C. You can write a
> > new file as "C.tmp" and then atomically switch with "mv C.tmp C" (at
> > least on POSIX platforms).
> One question about this:
>
> mv C.tmp C moves C.tmp into directory B :-/ (C is symlink to B)
>
> perhaps i misunderstood :-)
No, C is not a symlink in this scheme. It's a stub database file. So
"mv C.tmp C" replaces the current stub database file with the new one.
Cheers,
Olly
More information about the Xapian-discuss
mailing list