On Wed, Aug 23, 2023 at 01:53:27PM +0000, Eric Wong
wrote:> I'm already retrying the ->get_mset operations; but now I'm
> wondering where I'd hit DatabaseModifiedErrors while inside a
> Xapian::MSetIterator loop.
>
> I assume ->get_document is a place where it gets thrown;
> but once a document is retrieved, can iterating through
> terms in one document (using TermIterator) also throw DB modified?
If you only look at the terms and wdfs then you could only get
DatabaseModifiedError on the call to create the TermIterator since the
list of terms and wdfs is stored in a single entry per document which
is fetched when the iterator is created (it is conceivable this might
be different for a new database backend in the future I suppose).
If you call methods like get_doclength() which need to consult the
database those could throw.
Cheers,
Olly