add status value to _notmuch_message_ensure_metadata

David Bremner david at tethera.net
Thu Feb 23 03:59:51 PST 2017


Gaute Hope <eg at gaute.vetsj.com> 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 disk.  Looking more carefully at the backtrace, the
problem is actually inside the library, in particular some descendent of
notmuch_threads_get is not properly handling the error from
notmuch_message_get_tags.

> As I mentioned in
> id:1487582192.57s86yczcg.astroid at strange.none it seems that at later
> arbitrary iterations (without re-loading the threads object) the
> functions return valid data (even `notmuch_thread_get_tags` does). Can
> this data be trusted? I feel like this should all be invalid at this
> point.
>

I guess that's up to Xapian to decide, but I imagine anything after the
first exception is "undefined behaviour". Data is cached in memory per
message in the notmuch layer, so in principle later calls that don't
actually reach xapian could succeed.



More information about the notmuch mailing list