From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E8B0A6DE1CE6 for ; Wed, 22 Feb 2017 23:46:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.671 X-Spam-Level: X-Spam-Status: No, score=-0.671 tagged_above=-999 required=5 tests=[AWL=0.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K-RWKEGPbEOR for ; Wed, 22 Feb 2017 23:46:38 -0800 (PST) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by arlo.cworth.org (Postfix) with ESMTPS id 77F006DE1CDD for ; Wed, 22 Feb 2017 23:46:38 -0800 (PST) Received: by mail-lf0-f49.google.com with SMTP id l12so12550609lfe.0 for ; Wed, 22 Feb 2017 23:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaute-vetsj-com.20150623.gappssmtp.com; s=20150623; h=date:from:subject:to:references:in-reply-to:user-agent:message-id :mime-version:content-transfer-encoding; bh=w9iIGSRgQpQymbAnzXPSz552w0CmyeX9bUd/DbqyUpw=; b=perLgrgVfMynkyX3BjN/zmz8FJXa3gPy0er/VFlkqFUiR8lHYMrUuoupGLM+E+i9HQ MXUCyRe8vtvAlz2HDTyiT8pBnYO5pZ5KD2zu11ngIKw0IU+utpw3Uq9ztDcGzm7aZdbw 2PqYi6hijLVrIHp5JnpXDmvEQmmg5gCxjO8DGZbBS7PsGgCs/AALfP2HN6vXoSwh+zhS 9bmuQZP0ciABoZoI3I5csyZ9WgZ5cDK6aS710REuyJPp646Ql/CLZPxG8/RL01KItX9v QvbDjIvbM01bZr7k8gHE34MYDH3SADxJfPKKv3FZgzxppLIADT3/DvHBOqbc3GjdnUAO gB8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:references:in-reply-to :user-agent:message-id:mime-version:content-transfer-encoding; bh=w9iIGSRgQpQymbAnzXPSz552w0CmyeX9bUd/DbqyUpw=; b=jPisovLk0IhJPejpBhR9cBg5+1tZ3mTN+lZsaUoZJKcp9t2f+DYW4Wi70N3An7uUjn P/xfXDTSgxmryJya2owjU/7NUXHMrsdpk8ZLLRgWvMdVEjD34Ms0akhEiGrLadTIuR33 M7dXeTmswipyy5dXJ9JWrx2X3vCe2jefL71qHCvy1dsCRmiQNHDGYqTM6Ho36SH9Qx6i t+NDOjDTawNlWZwrCqYqvJmY6ILYSZ1KgOKGZk3C4S9fzcVBFair6fngzBo4n6iYS48Y C+dHqg4abSww15k98eoO0ck+IqfJwX6HMDF0P3xRl/cwzsv9JLAVmzVpLPQGhm3obssG S0uA== X-Gm-Message-State: AMke39m8cTKbVLJKOHfCyYpId/7oR9sc2QvNytnxn4kKLaB9Sw6xw82XG1xeIH7LIgqUQA== X-Received: by 10.25.203.6 with SMTP id b6mr8989245lfg.145.1487835993939; Wed, 22 Feb 2017 23:46:33 -0800 (PST) Received: from localhost (cm-84.215.128.252.getinternet.no. [84.215.128.252]) by smtp.gmail.com with ESMTPSA id v2sm7757848lja.31.2017.02.22.23.46.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Feb 2017 23:46:32 -0800 (PST) Date: Thu, 23 Feb 2017 07:46:29 +0000 From: Gaute Hope Subject: Re: add status value to _notmuch_message_ensure_metadata To: David Bremner , notmuch@notmuchmail.org References: <20170218144551.22925-1-david@tethera.net> <1487582192.57s86yczcg.astroid@strange.none> <1487583702.5ghl7kdkaw.astroid@strange.none> <874lzl4tah.fsf@tethera.net> In-Reply-To: <874lzl4tah.fsf@tethera.net> User-Agent: astroid/v0.7-41-gf493303d (https://github.com/astroidmail/astroid) Message-Id: <1487835689.bijpoe2rtt.astroid@strange.none> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 07:46:40 -0000 David Bremner writes on februar 23, 2017 1:58: > Gaute Hope writes: >=20 >> 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). >> >=20 > 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 >=20 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 =