Re: [RFC patch 2/2] lib: handle DatabaseModifiedError in _n_message_ensure_metadata

2017-02-23 Thread David Bremner
David Bremner writes: > The error handling here still needs work. The retry count should be > handled in more sane way, and both running out of retries and an error > return from notmuch_database_reopen should be handled. Probably the number of retries can be limited to 1,

[RFC patch 1/2] lib: add notmuch_database_reopen

2017-02-23 Thread David Bremner
The main expected use is to recover from a Xapian::DatabaseChanged exception. --- lib/database.cc | 19 +++ lib/notmuch.h | 12 2 files changed, 31 insertions(+) diff --git a/lib/database.cc b/lib/database.cc index 386dcd17..9c4be516 100644 --- a/lib/database.cc

[RFC patch 2/2] lib: handle DatabaseModifiedError in _n_message_ensure_metadata

2017-02-23 Thread David Bremner
The error handling here still needs work. The retry count should be handled in more sane way, and both running out of retries and an error return from notmuch_database_reopen should be handled. --- lib/message.cc | 144 - 1 file changed, 80

Re: bug report

2017-02-23 Thread David Bremner
Rafael Avila de Espindola writes: > David Bremner writes: > >> It's hard to be sure without more details, but it sounds like a locking >> problem, which could also be be fixed by upgrading to current xapian and >> notmuch. > > I currently have

Re: bug report

2017-02-23 Thread Rafael Avila de Espindola
David Bremner writes: > It's hard to be sure without more details, but it sounds like a locking > problem, which could also be be fixed by upgrading to current xapian and > notmuch. I currently have notmuch-0.23.5-1.fc25.x86_64 and xapian-core-1.2.24-1.fc25.x86_64. I haven't

Re: [PATCH] lib: fix g_hash_table related read-after-free bug

2017-02-23 Thread David Bremner
David Bremner writes: > The two g_hash_table functions (insert, add) have different behaviour > with respect to existing keys. g_hash_table_insert frees the new key, > while g_hash_table_add (which is really g_hash_table_replace in > disguise) frees the existing key. With this

Re: [PATCH 1/8] lib: make _notmuch_message_ensure_metadata static

2017-02-23 Thread David Bremner
David Bremner writes: > It's not called anywhere outside message.cc. patch 1 and 5 pushed to master ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH] emacs: fully add the notmuch-address customize group

2017-02-23 Thread David Bremner
Mark Walters writes: > We now have several customizable options for address completion. There > is a customize group notmuch-address but it only contains one of these > options. Add all the others, and make it part of the notmuch customize > group. > --- > > Bremner

Re: [PATCH] test: replaced use of python with $NOTMUCH_PYTHON (twice)

2017-02-23 Thread David Bremner
Tomi Ollila writes: > $NOTMUCH_PYTHON is sourced from sh.config, configured by > ./configure and stated to be used as: pushed to master d ___ notmuch mailing list notmuch@notmuchmail.org

Re: [PATCH] emacs: company: remove two build warnings

2017-02-23 Thread David Bremner
Mark Walters writes: > This adds two defvars to avoid two build warnings in the notmuch emacs > code. These were both introduced (by me) in commit 827c28a0. pushed to master d ___ notmuch mailing list

Re: add status value to _notmuch_message_ensure_metadata

2017-02-23 Thread David Bremner
Gaute Hope writes: > Ideally if the error could be caught in `notmuch_threads_valid` or > `notmuch_threads_get_thread` I think that would be the clearest, _st > versions would be nice. We can't really control when the exceptions happen, due to lazily reading data from