[Xapian-discuss] Question on "single writer, multiple reader"

Olly Betts olly at survex.com
Tue Jan 20 01:43:30 GMT 2015


On Sun, Jan 18, 2015 at 04:25:29PM +0000, James Aylett wrote:
> That’s exactly how it’s supposed to work. “Eventually” (once the
> writer gets sufficiently far ahead of the reader), the reader will get
> a DatabaseModifiedError and will have to re-open the database, but
> until then it’s up to it when it does so. You may wish to do it every
> N requests, or every K seconds, or only when you have to handle
> DatabaseModifiedError; it’s up to you.
>
> We have a note that some more detailed documentation around this would
> be helpful. For now, the following should be useful:
> <https://getting-started-with-xapian.readthedocs.org/en/latest/concepts/indexing/databases.html?highlight=databasemodifiederror#concurrent-access>.

I've just improved this with a note that reopen() is a cheap no-op when
there isn't a newer revision:

https://github.com/jaylett/xapian-docsprint/commit/41bb7a1da61d22e0047a83176386da4db1ee9f15

Cheers,
    Olly



More information about the Xapian-discuss mailing list