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 25D4A6DE1B8C for ; Fri, 24 Feb 2017 19:45:35 -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 PJbsF_fQffl5 for ; Fri, 24 Feb 2017 19:45:34 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 7FAF16DE1B4B for ; Fri, 24 Feb 2017 19:45:33 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1chTHv-0005mF-Fq; Fri, 24 Feb 2017 22:44:51 -0500 Received: (nullmailer pid 19501 invoked by uid 1000); Sat, 25 Feb 2017 03:45:27 -0000 From: David Bremner To: notmuch@notmuchmail.org, eg@gaute.vetsj.com Subject: v1 _notmuch_message_ensure_metadata exception handling Date: Fri, 24 Feb 2017 23:45:09 -0400 Message-Id: <20170225034513.19427-1-david@tethera.net> X-Mailer: git-send-email 2.11.0 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: Sat, 25 Feb 2017 03:45:35 -0000 In id:1487583702.5ghl7kdkaw.astroid@strange.none Gaute provided a test case that demonstrated an uncaught Xapian::DatabaseModifiedError in _notmuch_message_ensure_metadata. Starting with id:20170218144551.22925-2-david@tethera.net, I provided one approach to dealing with this via error propagation. I believe the current series is a better approach because it actually fixes the problem (i.e. re-opens the database), and because it takes less code. There are probably plenty of other places where the new notmuch_database_open needs to be called.