From: Austin Clements Date: Wed, 20 Apr 2016 03:36:48 +0000 (+2000) Subject: Re: [PATCH v4 7/7] complete ghost-on-removal-when-shared-thread-exists X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=91475b4d47b8767d6a702fde4ef37769a32d9883;p=notmuch-archives.git Re: [PATCH v4 7/7] complete ghost-on-removal-when-shared-thread-exists --- diff --git a/25/731b985c27f1aa938570621eb1d4a4a8e70f32 b/25/731b985c27f1aa938570621eb1d4a4a8e70f32 new file mode 100644 index 000000000..00d74be50 --- /dev/null +++ b/25/731b985c27f1aa938570621eb1d4a4a8e70f32 @@ -0,0 +1,132 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id B39476DE0188 + for ; Tue, 19 Apr 2016 21:03:56 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -1.259 +X-Spam-Level: +X-Spam-Status: No, score=-1.259 tagged_above=-999 required=5 tests=[AWL=1.052, + RCVD_IN_DNSWL_MED=-2.3, 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 8O28GugfpjdO for ; + Tue, 19 Apr 2016 21:03:48 -0700 (PDT) +X-Greylist: delayed 1614 seconds by postgrey-1.35 at arlo; + Tue, 19 Apr 2016 21:03:48 PDT +Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149]) + by arlo.cworth.org (Postfix) with ESMTP id 043DD6DE00D3 + for ; Tue, 19 Apr 2016 21:03:47 -0700 (PDT) +Received: from awakening.a20.io ([104.131.20.129] helo=awakening) + by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) + (Exim 4.72) (envelope-from ) + id 1asiwb-0004cv-IA; Tue, 19 Apr 2016 23:36:49 -0400 +Received: from amthrax by awakening with local (Exim 4.86) + (envelope-from ) + id 1asiwa-0004PY-Hk; Tue, 19 Apr 2016 23:36:48 -0400 +From: Austin Clements +To: Daniel Kahn Gillmor , + David Bremner , Notmuch Mail +Subject: Re: [PATCH v4 7/7] complete + ghost-on-removal-when-shared-thread-exists +In-Reply-To: <87zit0t0mj.fsf@alice.fifthhorseman.net> +References: <1459445693-3900-1-git-send-email-dkg@fifthhorseman.net> + <1460166892-29721-1-git-send-email-dkg@fifthhorseman.net> + <1460166892-29721-7-git-send-email-dkg@fifthhorseman.net> + <87r3ed6l35.fsf@zancas.localnet> <87zit0t0mj.fsf@alice.fifthhorseman.net> +User-Agent: Notmuch/0.21+62~g7edba1d (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Tue, 19 Apr 2016 23:36:48 -0400 +Message-ID: <87zispne7j.fsf@csail.mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Wed, 20 Apr 2016 04:03:56 -0000 + +On Mon, 11 Apr 2016, Daniel Kahn Gillmor wrote: +> On Sun 2016-04-10 20:33:02 -0400, David Bremner wrote: +>> Daniel Kahn Gillmor writes: +>> +>>> To fully complete the ghost-on-removal-when-shared-thread-exists +>>> proposal, we need to clear all ghost messages when the last active +>>> message is removed from a thread. +>> +>> For me this patch breaks T530 as follows +>> +>> T530-upgrade: Testing database upgrade +>> FAIL ghost message retains thread ID +>> --- T530-upgrade.13.expected 2016-04-11 00:25:19.482196274 +0000 +>> +++ T530-upgrade.13.output 2016-04-11 00:25:19.482196274 +0000 +>> @@ -1 +1 @@ +>> -thread:000000000000001d +>> +thread:0000000000000011 +>> No new mail. +>> No new mail. Removed 1 message. +>> +>> I pushed my rebased version of the patches to +>> +>> https://git.notmuchmail.org/git?p=notmuch;a=shortlog;h=refs/heads/thread-fix +>> +>> in case the problem is some mistake on my part. +> +> After having done "make download-test-databases", I can confirm that +> this is happening for me as well: it's not an issue with bremner's +> config. +> +> however, i think this particular test is wrong, and should probably be +> removed. +> +> For review, here's the final test: +> +> ---------- +> # Ghost messages are difficult to test since they're nearly invisible. +> # However, if the upgrade works correctly, the ghost message should +> # retain the right thread ID even if all of the original messages in +> # the thread are deleted. That's what we test. This won't detect if +> # the upgrade just plain didn't happen, but it should detect if +> # something went wrong. +> test_begin_subtest "ghost message retains thread ID" +> # Upgrade database +> notmuch new +> # Get thread ID of real message +> thread=$(notmuch search --output=threads id:4EFC743A.3060609@april.org) +> # Delete all real messages in that thread +> rm $(notmuch search --output=files $thread) +> notmuch new +> # "Deliver" ghost message +> add_message '[subject]=Ghost' '[id]=4EFC3931.6030007@april.org' +> # If the ghost upgrade worked, the new message should be attached to +> # the existing thread ID. +> nthread=$(notmuch search --output=threads id:4EFC3931.6030007@april.org) +> test_expect_equal "$thread" "$nthread" +> ------------- +> +> I don't think this reasoning is sensible. If the entire thread is +> deleted, and a new message comes in, it should *not* get the same mesage +> ID. ghosts should only exist in the database when other messages point +> to them. +> +> So i'd be fine with killing this entire last test, unless someone can +> propose a good reason to keep it. + +I agree that it's fine to remove this test. From what I recall, it +wasn't intended to test that ghost messages retained their thread IDs; +this was just the implementation property it exploited to test that +ghosts were working. + +I haven't looked through this series, but it would be nice if there was +still some tests that ghosts were working across upgrade.