[PATCH v2] Use the Xapian::DB_RETRY_LOCK flag when available
David Bremner
david at tethera.net
Thu May 5 03:33:25 PDT 2016
Istvan Marko <notmuch at kismala.com> writes:
> Regarding tests, I couldn't think of a meaningful test for this. We get
> different behaviors depending on the Xapian version and if we try do
> some kind of a concurrent locking test we'd really be just testing
> Xapian's locking code rather than notmuch.
We would be testing the build/configuration part to make sure we are
enabling the right flags, but more importantly testing the error
handling code, since we have to catch exceptions and pass them back
through the C library interface as error codes. One thing that would
make this easier to test is adding some finer grain errors than
"NOTMUCH_STATUS_XAPIAN_EXCEPTION" for notmuch_database_open_verbose to
return, to distinguish between the case of immediate failure and
timeout. Although it's not clear to me that Xapian actually provides a
timeout when DB_RETRY_LOCK is used.
More information about the notmuch
mailing list