From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QGIgH3HmmmBMWAEAgWs5BA (envelope-from ) for ; Tue, 11 May 2021 22:17:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cJXGGnHmmmBySgAAB5/wlQ (envelope-from ) for ; Tue, 11 May 2021 20:17:53 +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 38EB119E5A for ; Tue, 11 May 2021 22:17:53 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 8F55E27180; Tue, 11 May 2021 16:17:47 -0400 (EDT) Received: from mailproxy03.manitu.net (mailproxy03.manitu.net [217.11.48.67]) by mail.notmuchmail.org (Postfix) with ESMTPS id 2808627176 for ; Tue, 11 May 2021 16:17:45 -0400 (EDT) Received: from localhost (200116b86017d900ae2f9e0a625a9927.dip.versatel-1u1.de [IPv6:2001:16b8:6017:d900:ae2f:9e0a:625a:9927]) (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 mailproxy03.manitu.net (Postfix) with ESMTPSA id 73E76D40542; Tue, 11 May 2021 22:17:40 +0200 (CEST) MIME-Version: 1.0 In-Reply-To: <87k0o5go2k.fsf@tethera.net> References: <162075216869.247978.11973039285204032566.git@grubix.eu> <20210511174209.779891-1-david@tethera.net> <87k0o5go2k.fsf@tethera.net> Subject: Re: [PATCH] lib/notmuch_database_reopen: reload some database metada From: Michael J Gruber To: Alexander Adolf , David Bremner , notmuch@notmuchmail.org Message-ID: <162076424929.3234.3999254277296434834.git@grubix.eu> Date: Tue, 11 May 2021 22:17:29 +0200 User-Agent: alot/0.9.1 Message-ID-Hash: EWG46APFJBTTWALFUVZECKMTHMPXONH2 X-Message-ID-Hash: EWG46APFJBTTWALFUVZECKMTHMPXONH2 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=1620764273; 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=2O+yWIe7Rbck6bmfTy1H33OFjOvb0Ei/yz7DwiefAHU=; b=uAKw0UnLFmuFqWaWe+3U/nNRb6wcthWSpn9fBNizmH6Lf5bMLIVas4CW7LrqYPgZvBU7sj DofiFyDfpTljguIdZx325reqVF+dV9rcV1rrz+W+Xbm9IiHkxBkKlGznCUirS9AJ6iJL6Q 5pF1BffFAzGcDiGKsPU1u+gt4Qsoi5gX+N6hwVoFcMe8RogMZjerwScBbPya5ldCNKiz6u wNNlDyqOeKQK7HQ/8PGp3xjFHlCAZBZQeezX3/Zutzy6uy7dJQj+5+blIudQDRQgHpRgbS oFvD4/JxjMvlI618idk8P1QdH1/tpNu1KtmBss6WSFETtt7JOMSVImzTo3Le2Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620764273; a=rsa-sha256; cv=none; b=DhB/CmRPz70UnVifF6us1bO3mljEeurlSj4LlBOGyMCTMt7DjfeHGL6uFhnG0tzP+0VgjV jJ/j483ErKaPDdgFmu6GOhcheE1QYRKDZzvwr/65MOpN9Ba114N0NQGVJTKNvqgykl6/uc Rc5S65OP2H9QkedRcr/fb1O/P9sv7rq4sNUOTaLFAj7SXzPESHF6BDewVyv0QwiWuNiyy+ NPRutH+Bgbivf99IetqIFSmXe4v8uqZNIr8T4H1cSzZhYc91DqzsIIyg4+SInKYAudtmik QeF101GMOwp4yC9g6CUzoosH33HXqngtaZi9/MDKVaZzRLOlVvzCQG7XRa0lXA== ARC-Authentication-Results: i=1; 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-Spam-Score: 0.46 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: 38EB119E5A X-Spam-Score: 0.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: P2bHE/iISMr9 David Bremner venit, vidit, dixit 2021-05-11 19:47:15: > 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. > > d Haven't tried your patch yet, but worked on a test which even produces notmuch: lib/database.cc:1415: unsigned int _notmuch_database_generate_doc_id(notmuch_database_t*): Assertion `notmuch->last_doc_id >= notmuch->xapian_db->get_lastdocid ()' failed. by calling notmuch insert --no-hooks inside the pre-new hook of notmuch new ... (T400). I have to test with nm 0.31 and nm 0.32+plus patch before I send this out. Michael