From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eHIlBILYm2A5BwAAgWs5BA (envelope-from ) for ; Wed, 12 May 2021 15:30:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SEVGO4HYm2BSbQAAbx9fmQ (envelope-from ) for ; Wed, 12 May 2021 13:30:41 +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 6608F13D95 for ; Wed, 12 May 2021 15:30:41 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id ADADF27180; Wed, 12 May 2021 09:30:34 -0400 (EDT) Received: from mailproxy07.manitu.net (mailproxy07.manitu.net [217.11.48.71]) by mail.notmuchmail.org (Postfix) with ESMTPS id 92B312717A for ; Wed, 12 May 2021 09:30:31 -0400 (EDT) Received: from localhost (200116b8605ca20012b0ea84d94bc93e.dip.versatel-1u1.de [IPv6:2001:16b8:605c:a200:12b0:ea84:d94b:c93e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: michael@grubix.eu) by mailproxy07.manitu.net (Postfix) with ESMTPSA id 3FF54C82AA; Wed, 12 May 2021 15:30:29 +0200 (CEST) MIME-Version: 1.0 In-Reply-To: <87zgx0f94q.fsf@tethera.net> References: <162075216869.247978.11973039285204032566.git@grubix.eu> <20210511174209.779891-1-david@tethera.net> <87k0o5go2k.fsf@tethera.net> <87zgx0f94q.fsf@tethera.net> Subject: Re: [PATCH] lib/notmuch_database_reopen: reload some database metada To: David Bremner , notmuch@notmuchmail.org From: Michael J Gruber Message-ID: <162082622650.6226.11500786764764467710.git@grubix.eu> Date: Wed, 12 May 2021 15:30:26 +0200 User-Agent: alot/0.9.1 Message-ID-Hash: AZ75RHPC73R7EOGJD7MXTZBKYTO6X66O X-Message-ID-Hash: AZ75RHPC73R7EOGJD7MXTZBKYTO6X66O X-MailFrom: michael@grubix.eu 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=1620826241; 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=zPsijqZDJQfYVutWWNJT+ajIhr9GbB86x5mDpg+Uunw=; b=LWSzqdvQOFXUAVwKS2ipgjLTnlEXgp5Owcu82EJ6WR/6/O26lAd+C2A8gdKGQ6dNpzVW5b JpwH0X9Db8n1GYNF29eWeTDtlb8ZHIN0wlqThTuJlHq9uUqaKMUHAGSS+t0GW/NoxTofdS tQEOi1Wiwh1gGKdetccOTQqTLiSizzR00uCKKS3Woeu+IugQIKKPCU7PKgIvqQYAahCTNX VLp3dDOLrFYUEX8GlP1WhNtOoiwGbwhf474zvBulBlgqy2yPr8ROdnhtSHdkQHcpMrRydD 0Y7gR2vppbnNHu0+kH+wkeaVle8botlxwKqOKyr7Yi5PCdci6pcggflVdCw24A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620826241; a=rsa-sha256; cv=none; b=RPB8QSab0s2zdEZ+ZUzMGfK+FxaYOMhXyzGwfBnMn8kKprPytyMf71nL+3GjajIO2d7VFq EUvexugfbOv5JM6Jm/pixCShmkZAqAYg3lkx86SjaEnaal4Sjs9LQzz6D+RrbQeMvnsXIo Nu2QyFi/18/XWG/5/xH9i0cm+msLAB8L6yEcgyKUDs1g/MBKC8jEqRXAEZ/j5XAasOYCQ9 61bNnyWzmUCTdglZCGkU6daKMRVMUZrL32BnJtQ/Vyibut4WWw/6gHTZO71+sklEZ+mN+v 6kWBdReM2zaln7uugUKZttOY8IlQ41iCMkPw7jGcfEPjKdeIkzkVNlJgQtpsfw== 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: -1.07 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: 6608F13D95 X-Spam-Score: -1.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: ycVuabxcetZD David Bremner venit, vidit, dixit 2021-05-12 14:07:33: > David Bremner writes: > > > David Bremner writes: > > > >> In some uses of reopen, new documents and threads maybe have been > >> added, and e.g. compaction may have changed the uuid. > > > > It's quite possible there is more cached data that should be discarded, > > but I'll have to think about that a bit more. > > > > The following are at least potential problems, although I think none of > them are as urgent as the doc_id / thread_id issue. > > exception_reported should probably be reset to false > > atomic_nesting, atomic_dirty. Re-opening while in an open atomic > section is currently undefined > behaviour, should be checked. > > features Theoretically if the user runs notmuch-new in a pre-new hook, > the database could be upgraded. For now, I suggest not doing > that. This should be fixabable, but I prefer to take more time. Out of curiosity: What does reopening gain compared to a full close/open cycle? Michael