[PATCH v2 0/7] improve DatabaseModifiedError handling

Subject: [PATCH v2 0/7] improve DatabaseModifiedError handling

Date: Sun, 27 Jul 2025 16:11:43 +0200

To: notmuch@notmuchmail.org

Cc:

From: Anton Khirnov


Hi,
this is a second version of my set improving DatabaseModifiedError
handling, especially when it's raised when iterating over query results.

The first two patches (dealing with iterating over messages) are already
in git master, so this contains:
* the analogous change for threads iteration
* python bindings update
* returning NOTMUCH_STATUS_OPERATION_INVALIDATED instead of the generic
  NOTMUCH_STATUS_XAPIAN_EXCEPTION in various places

Anton Khirnov (7):
  lib/config: simplify cleanup in notmuch_database_get_config_list()
  test: add a known broken test for DatabaseModifiedError from threads
    iteration
  lib: add notmuch_threads_status()
  lib/database-private: undef XAPIAN_DEPRECATED before redefining it
  lib: return NOTMUCH_STATUS_OPERATION_INVALIDATED where appropriate
  bindings/python-cffi: allow reopening a database
  bindings/python-cffi: handle NOTMUCH_STATUS_OPERATION_INVALIDATED

 bindings/python-cffi/notmuch2/_base.py      |  24 ++++-
 bindings/python-cffi/notmuch2/_build.py     |   9 ++
 bindings/python-cffi/notmuch2/_database.py  |  15 +++
 bindings/python-cffi/notmuch2/_errors.py    |   3 +
 bindings/python-cffi/notmuch2/_message.py   |   3 +-
 bindings/python-cffi/notmuch2/_thread.py    |   3 +-
 bindings/python-cffi/tests/test_database.py |  84 ++++++++++++++++
 lib/add-message.cc                          |   2 +-
 lib/config.cc                               |  16 +---
 lib/database-private.h                      |   1 +
 lib/database.cc                             |  14 +--
 lib/directory.cc                            |   6 +-
 lib/message-property.cc                     |   4 +-
 lib/message.cc                              |  16 ++--
 lib/notmuch-private.h                       |  21 +++-
 lib/notmuch.h                               |  31 +++++-
 lib/parse-sexp.cc                           |   2 +-
 lib/query.cc                                |  48 +++++++---
 lib/thread.cc                               |  11 ++-
 test/T642-database-modified-threads.sh      | 101 ++++++++++++++++++++
 20 files changed, 355 insertions(+), 59 deletions(-)
 create mode 100755 test/T642-database-modified-threads.sh

-- 
2.39.5

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: