[Xapian-devel] Database Locking

Olly Betts olly at survex.com
Fri Apr 8 14:35:52 BST 2005

On Fri, Apr 08, 2005 at 02:02:39PM +0100, Richard Boulton wrote:
> This makes a good deal of sense to me.

We might also need this for Database if we want to lock revisions which
are in use to eliminate the annoying DatabaseModifiedError.  Which means
that the overhead matters more...

> Using "cat" as a helper sounds a reasonable plan - I first thought that
> it would cause problems if the helper was absent, but /bin/cat is pretty
> fundamental.  Then I thought that some "cat"s might have a fair bit of
> junk in them which we don't want to bring into memory, but GNU cat is
> only 16k on my system

Yeah, I thought "I bet GNU cat is pretty bloated", but it's not bad at
all.  It's quite likely that it won't all need to be paged in too,
plus hopefully the libc pages needed will already be swapped in.

> things anyway.  And though the options to cat vary between systems, that
> won't be a problem because you won't need to pass any options anyway.

It might be a win to have a statically linked helper, but it's hard to
say really.  Profiling is needed, but using /bin/cat is probably a good
first pass.


More information about the Xapian-devel mailing list