Re: [PATCH v4 10/16] Add n_d_add_message_with_indexopts (extension of n_d_add_message)
[notmuch-archives.git] / 57 / 6de2934de81b787a6a6bdd5be32a55aedf11a0
1 Return-Path: <dkg@fifthhorseman.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 0BA806DE00BB\r
6  for <notmuch@notmuchmail.org>; Mon, 11 Apr 2016 12:19:01 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.02\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[AWL=-0.020]\r
12  autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id K77ZJGdMs0Jx for <notmuch@notmuchmail.org>;\r
16  Mon, 11 Apr 2016 12:18:52 -0700 (PDT)\r
17 Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 8D3EE6DE00E1\r
19  for <notmuch@notmuchmail.org>; Mon, 11 Apr 2016 12:18:52 -0700 (PDT)\r
20 Received: from fifthhorseman.net (unknown [38.109.115.130])\r
21  by che.mayfirst.org (Postfix) with ESMTPSA id 29168F991;\r
22  Mon, 11 Apr 2016 15:18:48 -0400 (EDT)\r
23 Received: by fifthhorseman.net (Postfix, from userid 1000)\r
24  id 55E9E20072; Mon, 11 Apr 2016 15:18:48 -0400 (EDT)\r
25 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
26 To: David Bremner <david@tethera.net>, Notmuch Mail <notmuch@notmuchmail.org>\r
27 Subject: Re: [PATCH v4 7/7] complete\r
28  ghost-on-removal-when-shared-thread-exists\r
29 In-Reply-To: <87r3ed6l35.fsf@zancas.localnet>\r
30 References: <1459445693-3900-1-git-send-email-dkg@fifthhorseman.net>\r
31  <1460166892-29721-1-git-send-email-dkg@fifthhorseman.net>\r
32  <1460166892-29721-7-git-send-email-dkg@fifthhorseman.net>\r
33  <87r3ed6l35.fsf@zancas.localnet>\r
34 User-Agent: Notmuch/0.21+124~gbf604e9 (http://notmuchmail.org) Emacs/24.5.1\r
35  (x86_64-pc-linux-gnu)\r
36 Date: Mon, 11 Apr 2016 15:18:44 -0400\r
37 Message-ID: <87zit0t0mj.fsf@alice.fifthhorseman.net>\r
38 MIME-Version: 1.0\r
39 Content-Type: multipart/signed; boundary="=-=-=";\r
40  micalg=pgp-sha512; protocol="application/pgp-signature"\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.20\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45  <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
47  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
52  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Mon, 11 Apr 2016 19:19:01 -0000\r
54 \r
55 --=-=-=\r
56 Content-Type: text/plain\r
57 \r
58 On Sun 2016-04-10 20:33:02 -0400, David Bremner <david@tethera.net> wrote:\r
59 > Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\r
60 >\r
61 >> To fully complete the ghost-on-removal-when-shared-thread-exists\r
62 >> proposal, we need to clear all ghost messages when the last active\r
63 >> message is removed from a thread.\r
64 >\r
65 > For me this patch breaks T530 as follows\r
66 >\r
67 > T530-upgrade: Testing database upgrade\r
68 >  FAIL   ghost message retains thread ID\r
69 >       --- T530-upgrade.13.expected    2016-04-11 00:25:19.482196274 +0000\r
70 >       +++ T530-upgrade.13.output      2016-04-11 00:25:19.482196274 +0000\r
71 >       @@ -1 +1 @@\r
72 >       -thread:000000000000001d\r
73 >       +thread:0000000000000011\r
74 > No new mail.\r
75 > No new mail. Removed 1 message.\r
76 >\r
77 > I pushed my rebased version of the patches to\r
78 >\r
79 >   https://git.notmuchmail.org/git?p=notmuch;a=shortlog;h=refs/heads/thread-fix\r
80 >\r
81 > in case the problem is some mistake on my part.\r
82 \r
83 After having done "make download-test-databases", I can confirm that\r
84 this is happening for me as well: it's not an issue with bremner's\r
85 config.\r
86 \r
87 however, i think this particular test is wrong, and should probably be\r
88 removed.\r
89 \r
90 For review, here's the final test:\r
91 \r
92 ----------\r
93 # Ghost messages are difficult to test since they're nearly invisible.\r
94 # However, if the upgrade works correctly, the ghost message should\r
95 # retain the right thread ID even if all of the original messages in\r
96 # the thread are deleted.  That's what we test.  This won't detect if\r
97 # the upgrade just plain didn't happen, but it should detect if\r
98 # something went wrong.\r
99 test_begin_subtest "ghost message retains thread ID"\r
100 # Upgrade database\r
101 notmuch new\r
102 # Get thread ID of real message\r
103 thread=$(notmuch search --output=threads id:4EFC743A.3060609@april.org)\r
104 # Delete all real messages in that thread\r
105 rm $(notmuch search --output=files $thread)\r
106 notmuch new\r
107 # "Deliver" ghost message\r
108 add_message '[subject]=Ghost' '[id]=4EFC3931.6030007@april.org'\r
109 # If the ghost upgrade worked, the new message should be attached to\r
110 # the existing thread ID.\r
111 nthread=$(notmuch search --output=threads id:4EFC3931.6030007@april.org)\r
112 test_expect_equal "$thread" "$nthread"\r
113 -------------\r
114 \r
115 I don't think this reasoning is sensible.  If the entire thread is\r
116 deleted, and a new message comes in, it should *not* get the same mesage\r
117 ID.  ghosts should only exist in the database when other messages point\r
118 to them.\r
119 \r
120 So i'd be fine with killing this entire last test, unless someone can\r
121 propose a good reason to keep it.\r
122 \r
123         --dkg\r
124 \r
125 --=-=-=\r
126 Content-Type: application/pgp-signature; name="signature.asc"\r
127 \r
128 -----BEGIN PGP SIGNATURE-----\r
129 Version: GnuPG v2\r
130 \r
131 iQJ8BAEBCgBmBQJXC/iVXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\r
132 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFREIyRTc0RjU2RkNGMkI2NzI5N0I3MzUy\r
133 NEVDRkY1QUZGNjgzNzBBAAoJECTs/1r/aDcK0mMP/2uFFlhIVN90Elg2y0qb7ahb\r
134 iA+i9iI9tARYaKyo26zxlOVCMfrzYPfgyQC9F1T4VZzTj9mtigOLzR1bEtoYTvoG\r
135 XuZK78Ytkjx2INeWzLEw/QxNFcJahDMEkC80UiGNMYwYnPUYjNPLprIrWQ9SAM7T\r
136 vTBVYjjkkNJpcYMIRd7uTz63sC/kuk8MWK9CmnuUdpMYnnJayOAUFAeJNjR0b/ZG\r
137 hGNWY9vbJrehKKYxozayn500NfDuASdpdtdGXLXjFxzMwQEVDSl99men6nxaTijT\r
138 gYKTotB6A3/YF1XIptMmo7IHu6DnhthlfEXXfLZAbaTIff95eQLq5J196Om8fNNB\r
139 jY9AL46w4JLtSNH95bH8NGuegQ4SMhskXBZb2D4LTpxmAktgglWlhcFemlp7omsR\r
140 lwJufU4B7EcLL1OxlUb9CEvHUsG96zyVT65b1f5xVtf5tTwJctT9KfFThy1KDBcc\r
141 TVuJC86j+Z/pEf/3s1tes6iYFjXz5UVV1Pdlp6SDVP5xUi6IaKQ5Pp+H36jKaz1S\r
142 F+s2nhc34P/IZB+nx/qLt1EgAsN+zT7NmyQCuN4lum2ntGX0NwP7p1OKlxnFNGWi\r
143 YDVaAsAjQOY4w4fVB0yWAg5MslvVtCb+pgCKiZX1rHb6P5fBxjWSU08jRFerSmaa\r
144 Dgh4S1MMFHK5T1qcKJiM\r
145 =f7Sb\r
146 -----END PGP SIGNATURE-----\r
147 --=-=-=--\r