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 B0FA96DE1E92 for ; Wed, 22 Feb 2017 16:58:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.005 X-Spam-Level: X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 tests=[AWL=0.006, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-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 QIboLn5vUq1L for ; Wed, 22 Feb 2017 16:58:36 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id C16F26DE1E8E for ; Wed, 22 Feb 2017 16:58:35 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1cghjG-0003Ap-Fq; Wed, 22 Feb 2017 19:57:54 -0500 Received: (nullmailer pid 27507 invoked by uid 1000); Thu, 23 Feb 2017 00:58:30 -0000 From: David Bremner To: Gaute Hope , notmuch@notmuchmail.org Subject: Re: add status value to _notmuch_message_ensure_metadata In-Reply-To: <1487583702.5ghl7kdkaw.astroid@strange.none> References: <20170218144551.22925-1-david@tethera.net> <1487582192.57s86yczcg.astroid@strange.none> <1487583702.5ghl7kdkaw.astroid@strange.none> Date: Wed, 22 Feb 2017 20:58:30 -0400 Message-ID: <874lzl4tah.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain 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 00:58:36 -0000 Gaute Hope 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