From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: David Bremner <david@tethera.net>,
Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH v4 7/7] complete ghost-on-removal-when-shared-thread-exists
Date: Mon, 11 Apr 2016 15:18:44 -0400 [thread overview]
Message-ID: <87zit0t0mj.fsf@alice.fifthhorseman.net> (raw)
In-Reply-To: <87r3ed6l35.fsf@zancas.localnet>
[-- Attachment #1: Type: text/plain, Size: 2454 bytes --]
On Sun 2016-04-10 20:33:02 -0400, David Bremner <david@tethera.net> wrote:
> Daniel Kahn Gillmor <dkg@fifthhorseman.net> 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.
--dkg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 948 bytes --]
next prev parent reply other threads:[~2016-04-11 19:19 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 17:34 [PATCH] test thread breakage when messages are removed and re-added Daniel Kahn Gillmor
2016-04-01 22:27 ` Daniel Kahn Gillmor
2016-04-01 23:31 ` [PATCH 1/2] verify during thread-breakage that messages are removed as well Daniel Kahn Gillmor
2016-04-01 23:31 ` [PATCH 2/2] fix thread breakage via ghost-on-removal Daniel Kahn Gillmor
2016-04-02 14:15 ` [PATCH v2 1/7] test thread breakage when messages are removed and re-added Daniel Kahn Gillmor
2016-04-02 14:15 ` [PATCH v2 2/7] verify during thread-breakage that messages are removed as well Daniel Kahn Gillmor
2016-04-06 1:20 ` David Bremner
2016-04-09 1:54 ` Daniel Kahn Gillmor
2016-04-02 14:15 ` [PATCH v2 3/7] fix thread breakage via ghost-on-removal Daniel Kahn Gillmor
2016-04-05 6:53 ` Tomi Ollila
2016-04-05 20:05 ` Daniel Kahn Gillmor
2016-04-05 23:33 ` David Bremner
2016-04-06 1:39 ` David Bremner
2016-04-02 14:15 ` [PATCH v2 4/7] Add internal functions to search for alternate doc types Daniel Kahn Gillmor
2016-04-06 1:52 ` David Bremner
2016-04-02 14:15 ` [PATCH v2 5/7] Introduce _notmuch_message_has_term() Daniel Kahn Gillmor
2016-04-06 2:04 ` David Bremner
2016-04-02 14:15 ` [PATCH v2 6/7] On deletion, replace with ghost when other active messages in thread Daniel Kahn Gillmor
2016-04-02 14:15 ` [PATCH v2 7/7] complete ghost-on-removal-when-shared-thread-exists Daniel Kahn Gillmor
2016-04-02 16:19 ` [PATCH 1/2] test thread breakage when messages are removed and re-added David Bremner
2016-04-02 16:19 ` [PATCH 2/2] test: add test-binary to print the number of ghost messages David Bremner
2016-04-09 1:02 ` [PATCH v3 1/7] " Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 2/7] test thread breakage when messages are removed and re-added Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 3/7] fix thread breakage via ghost-on-removal Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 4/7] Add internal functions to search for alternate doc types Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 5/7] Introduce _notmuch_message_has_term() Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 6/7] On deletion, replace with ghost when other active messages in thread Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 7/7] complete ghost-on-removal-when-shared-thread-exists Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 1/7] test: add test-binary to print the number of ghost messages Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 2/7] test thread breakage when messages are removed and re-added Daniel Kahn Gillmor
2016-04-11 13:59 ` [PATCH] remove debugging spew from T590 Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 3/7] fix thread breakage via ghost-on-removal Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 4/7] Add internal functions to search for alternate doc types Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 5/7] Introduce _notmuch_message_has_term() Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 6/7] On deletion, replace with ghost when other active messages in thread Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 7/7] complete ghost-on-removal-when-shared-thread-exists Daniel Kahn Gillmor
2016-04-09 11:31 ` David Bremner
2016-04-09 18:55 ` Daniel Kahn Gillmor
2016-04-09 19:15 ` David Bremner
2016-04-10 8:35 ` Tomi Ollila
2016-04-11 0:33 ` David Bremner
2016-04-11 19:18 ` Daniel Kahn Gillmor [this message]
2016-04-12 1:28 ` David Bremner
2016-04-15 10:29 ` David Bremner
2016-04-20 3:36 ` Austin Clements
2016-04-09 11:02 ` [PATCH v4 1/7] test: add test-binary to print the number of ghost messages David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zit0t0mj.fsf@alice.fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).