← Back to team overview

software-store-developers team mailing list archive

DatabaseModified error

 

So looking at the bugs today, a fair few reports are related to
DatabaseModified errors.  Is this still an occurring phenomena?  I have
never seen this, but if people are experiencing this bug I wonder if this is
not due to our use of a single instance of a xapian db?

>From what i can tell from the xapian mailing-lists best practice is to open
a new read-only xapian.Database instance per query. This definitely solved
my issues with DatabaseCorrupt errors in the appstore-experiment branch.

AFAICT: An instance of a xapian db cannot natively handle concurrent
queries.  However, we can open an unlimited number of xapian.Databases
simultaneously and preform queries on each at the same time, and this would
seem recommended usage in most webserver type scenarios.

I also stumbled upon docs for other python-xapian bindings and it seems at
least one serialises queries to ensure races and the like do not occur.
 Moreover, in some documentation (i found) they explain they have no locking
mechanism (to avoid both performance and maintenance overhead) and they
recommend implementing your own mechanisms if required.

Disclaimer: a lot of the docs/list-conversations i found were a few years
old, but i couldn't see any release overviews which indicated any
substantial change in this domain.

I am just thinking aloud... on a friday night... after a wine... or two ...
... regardless of whether i am on the right track, and assuming these errors
are still occurring, we should definitely investigate the source of this
issue? Yes? No?



Cheerio,
Matt

-- 
>From the mind of me!

Follow ups