From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CBbaB4MGm2ADFwAAgWs5BA (envelope-from ) for ; Wed, 12 May 2021 00:34:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id F2eJA4MGm2CzDgAA1q6Kng (envelope-from ) for ; Tue, 11 May 2021 22:34:43 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7FE83180DB for ; Wed, 12 May 2021 00:34:42 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B95762717B; Tue, 11 May 2021 18:34:38 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0756427176 for ; Tue, 11 May 2021 18:34:35 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id AC58660016; Tue, 11 May 2021 18:34:34 -0400 (EDT) Received: (nullmailer pid 898575 invoked by uid 1000); Tue, 11 May 2021 22:34:33 -0000 From: David Bremner To: Michael J Gruber , notmuch@notmuchmail.org Subject: Re: [PATCH] test: change database from within pre-new hook In-Reply-To: References: <162076424929.3234.3999254277296434834.git@grubix.eu> Date: Tue, 11 May 2021 19:34:33 -0300 Message-ID: <87fsyshpc6.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: BBXLROLD4KH4FTDRXBW2H4YZ5STPODIF X-Message-ID-Hash: BBXLROLD4KH4FTDRXBW2H4YZ5STPODIF X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620772482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UIkYMohglECMUgCmjQOttN4Mmh+CCATsJp2luD+V3QQ=; b=FFZ4J9XPQibnskix930yC7K2qA2C0RbGceh9DLXCn4cNZ8egrp/aYXpoHu9k2rzMpS9WFk GDCVYT9cw40QCpG1Sea7VLY4n+RTlfvw2xamy8H6A21aGHZUA6fRjtIco5t+geynuPcfHB F/XtlQBDzGMY+S3Ti6TCteunQRvJfmPJgEtlzeiX96lj/6sUOhgmJh65Rwq8+rseCr+Ci9 zJvaUsjmws0C7v3o+OTY/oHa0NIZrWJ5BFTfObHSJRez27qQsIjQXjKhxY5BgTRn7v179M JZH2CmSLloW61uR8NIKeitWQlQOso8d7iqY0As7XyVvJpwB3ABeevSjFqKAKZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620772482; a=rsa-sha256; cv=none; b=F9D/gTbYuMfQ8MTTJ8FbW+kuAJuto9rBMChioPAz3owChZ8jsRR5v+lW+8yD+qv8ZNxHxQ o/lYyYhG6O9bnY5bqucjHiZ1ikRPTbN2LM4lh1mR/irZjG3LxOqJku2UHFM1ltu97p9p1+ 4tW72pXB9/cwHbUOs5D/G/U09vE9mCjTNzqdZyKdpbJ6sFExvhYzZAVX3wnIv45EtQqVWn ENhpsVFFqpW0dGyw/OiZtUYfZlCm1c+bvLmkE39Osjzmrqt3TtWVzYTiWLMN2EQ4aeXpAu LcQ0idzkJS294a7MqKIlcGsEgbH9lZLTW/ujV3cz/DPcHWaBtMF+VmrpwOZ8KQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 7FE83180DB X-Spam-Score: -2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: +SWdJSDLGdTl Michael J Gruber writes: > Due to the change in the config system, notmuch keeps a notmuch database > open when it would not do so before. Consequently, it can miss changes > to the database which are done from a hook (while notmuch holds the > databse in read only mode). When notmuch itself writes to the database > after that it uses wrong assumptions about the last used doc id etc. > > Demonstrate this by triggering an assertion. (This new test succeeds > with notmuch 0.31.4.) > > Signed-off-by: Michael J Gruber > --- > test/T400-hooks.sh | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > + notmuch search '*' > change.expected That line looks like leftover debugging to me, so I deleted it. Otherwise it works fine, thanks for tracking down the bug and providing a test. d