]> git.notmuchmail.org Git - notmuch/commit
lib: handle DatabaseModifiedError in _n_message_ensure_metadata
authorDavid Bremner <david@tethera.net>
Sat, 18 Feb 2017 01:28:05 +0000 (21:28 -0400)
committerDavid Bremner <david@tethera.net>
Sun, 26 Feb 2017 01:13:50 +0000 (21:13 -0400)
commite0b22c139c0a9cd2b7dc5afb96e4ccec4f6b1641
tree41165690c2c3901c4d19ec3733c265bf36962a56
parente17a914b77230d942b36639c261c345849fe9d52
lib: handle DatabaseModifiedError in _n_message_ensure_metadata

The retries are hardcoded to a small number, and error handling aborts
than propagating errors from notmuch_database_reopen. These are both
somewhat justified by the assumption that most things that can go
wrong in Xapian::Database::reopen are rare and fatal. Here's the brief
discussion with Xapian upstream:

   24-02-2017 08:12:57 < bremner> any intuition about how likely
      Xapian::Database::reopen is to fail? I'm catching a
      DatabaseModifiedError somewhere where handling any further errors is
      tricky, and wondering about treating a failed reopen as as "the
      impossible happened, stopping"

   24-02-2017 16:22:34 < olly> bremner: there should not be much scope for
    failure - stuff like out of memory or disk errors, which are probably a
    good enough excuse to stop
lib/message.cc
test/T640-database-modified.sh