unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Gaute Hope <eg@gaute.vetsj.com>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: add status value to _notmuch_message_ensure_metadata
Date: Thu, 23 Feb 2017 07:46:29 +0000	[thread overview]
Message-ID: <1487835689.bijpoe2rtt.astroid@strange.none> (raw)
In-Reply-To: <874lzl4tah.fsf@tethera.net>

David Bremner writes on februar 23, 2017 1:58:
> Gaute Hope <eg@gaute.vetsj.com> writes:
> 
>> Gaute Hope writes on februar 20, 2017 10:27:
>>> David Bremner writes on februar 18, 2017 15:45:
>>>> In id:1487339566.mz8acpov1j.astroid@strange.none , Gaute provided a
>>>> traceback of an uncaught Xapian::DatabaseModifiedError. The fix for
>>>> this is simple, but somewhat intrusive.
>>>>
>>>> [...]
>>>>
>>>> I haven't tested against Gaute's test case (needs more boost than I
>>>> have handy).
>>
>> Alright then, attached is a non-boost version that takes a notmuch db
>> path (absolute) as the first argument (no warranty).
>>
> 
> With the patches above this crashes in a predictable / preventable way,
> because notmuch_message_get_tags returns NULL. It isn't clear to me yet
> what the best API choice is here: minimize difference with the old API
> by returning NULL to indicate errors, or switch completely to the
> pattern of e.g. notmuch_query_search_messages_st. I suppose we could do
> something along the same lines and add new _st versions of the
> problematic functions
> 

Hi,

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. As I mentioned in
id:1487582192.57s86yczcg.astroid@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.

Regards, Gaute


  reply	other threads:[~2017-02-23  7:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18 14:45 add status value to _notmuch_message_ensure_metadata David Bremner
2017-02-18 14:45 ` [PATCH 1/8] lib: make _notmuch_message_ensure_metadata static David Bremner
2017-02-23 12:59   ` David Bremner
2017-02-18 14:45 ` [PATCH 2/8] lib: add status return to _notmuch_message_ensure_metadata David Bremner
2017-02-18 14:45 ` [PATCH 3/8] lib: propagate error return from some calls to _n_m_e_metadata David Bremner
2017-02-18 14:45 ` [PATCH 4/8] lib: push error from nme_metadata through nme_filename_list David Bremner
2017-02-18 14:45 ` [PATCH 5/8] lib: make _notmuch_message_ensure_property_map static David Bremner
2017-02-18 14:45 ` [PATCH 6/8] lib: propagate errors from nme_metadata through properties API David Bremner
2017-02-18 14:45 ` [PATCH 7/8] lib: add notmuch_message_get_database to public API David Bremner
2017-02-18 14:45 ` [PATCH 8/8] lib: add status return to notmuch_message_get_flag David Bremner
2017-02-20  9:27 ` add status value to _notmuch_message_ensure_metadata Gaute Hope
2017-02-20  9:44   ` Gaute Hope
2017-02-23  0:58     ` David Bremner
2017-02-23  7:46       ` Gaute Hope [this message]
2017-02-23 11:59         ` David Bremner
2017-02-24  2:00           ` [RFC patch 1/2] lib: add notmuch_database_reopen David Bremner
2017-02-24  2:00             ` [RFC patch 2/2] lib: handle DatabaseModifiedError in _n_message_ensure_metadata David Bremner
2017-02-24  2:49               ` David Bremner
2017-02-24 10:21                 ` Gaute Hope
2017-02-24 11:40                   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487835689.bijpoe2rtt.astroid@strange.none \
    --to=eg@gaute.vetsj.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).