From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uGigAg7Fm2DDZAEAgWs5BA (envelope-from ) for ; Wed, 12 May 2021 14:07:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IF3aOQ3Fm2D7AgAAB5/wlQ (envelope-from ) for ; Wed, 12 May 2021 12:07:41 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 1BCBDAFBA for ; Wed, 12 May 2021 14:07:41 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1FDE22717B; Wed, 12 May 2021 08:07:37 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 274742717A for ; Wed, 12 May 2021 08:07:35 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id F127F60018; Wed, 12 May 2021 08:07:34 -0400 (EDT) Received: (nullmailer pid 1119182 invoked by uid 1000); Wed, 12 May 2021 12:07:33 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Re: [PATCH] lib/notmuch_database_reopen: reload some database metada In-Reply-To: <87k0o5go2k.fsf@tethera.net> References: <162075216869.247978.11973039285204032566.git@grubix.eu> <20210511174209.779891-1-david@tethera.net> <87k0o5go2k.fsf@tethera.net> Date: Wed, 12 May 2021 09:07:33 -0300 Message-ID: <87zgx0f94q.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: DZQQJDLE3XNKZESHEG644BVNQRDLMBU2 X-Message-ID-Hash: DZQQJDLE3XNKZESHEG644BVNQRDLMBU2 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=1620821261; 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=9mSYpN16ttlswuc7Cb3clZ2sz0P0puqieoGu+g6oaj0=; b=Pda0bXEsixGMaa88KPsyppkQsnYRr/DvnJx/2yC0HFv79eFMlbkacVmlOQhb7bzNf7VY0v wWKp4U+6z4G/sNwLkqbahZrqitEL8MY4IsCSmc/t3+lrKlZMfkcHCGzCZMfB2AbeNKS1yM mfDFtztarA3jo1rSy5/oJdxHHbF3pOAFdSMTBRrJjmH2lCjgry8tTK3+hl9cGy13P3V+uk 2LxNZu0mb2iy3DVS82Sez3+UaMXFOt/D2RVocG4fuycHNOg83jdY/SRT2GNdeZf3I4m2y9 VVN+zwaTPSx8aBPioECm2EMZYNa5G9MBv1U/CEMLslB4E12ANh+bCrvRT7fCuw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620821261; a=rsa-sha256; cv=none; b=MI/DTe3/wSCjlYY8vCT4Bo9bEHLbgJrlNsQYff3Ttzm2D2PaZuHCfKluqVhJ2x7cFXJ7MY KMKYQqRyS19SCZwveqHAHN9zkm16SsHza6qUtaYd/E1TF6TbJbSt2GM+8g9+JDI7TsxSTS /I5Me3AaQ2DSlT2C80p+zcJmW/mYe78y6CypuS003qgEBKaMrJAqV3TJci/tOmb6P55o+3 qxPp2K5kxGoyr0xJutE7WglWQGT2Oy2TFEcd3uQmTYNrw6L9i5mgRvdOxVxRqHW43HPw3J LO5kmmlKu+WPE31dRJyjDBPF7XrH3oc85Wr3KvyIsLLi95wZctAu1MoAOF5PrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 1BCBDAFBA X-Spam-Score: -2.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: NFf007Tm9Yzv 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.