--- /dev/null
+Return-Path: <dkg@fifthhorseman.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id CA7D36DE0243\r
+ for <notmuch@notmuchmail.org>; Fri, 1 Apr 2016 18:50:21 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 5IbO_3VX6i4Y for <notmuch@notmuchmail.org>;\r
+ Fri, 1 Apr 2016 18:50:13 -0700 (PDT)\r
+Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 97AA26DE00DF\r
+ for <notmuch@notmuchmail.org>; Fri, 1 Apr 2016 18:50:13 -0700 (PDT)\r
+Received: from fifthhorseman.net (unknown [190.172.4.74])\r
+ by che.mayfirst.org (Postfix) with ESMTPSA id 4E774F99D\r
+ for <notmuch@notmuchmail.org>; Fri, 1 Apr 2016 21:50:11 -0400 (EDT)\r
+Received: by fifthhorseman.net (Postfix, from userid 1000)\r
+ id BCA862059B; Fri, 1 Apr 2016 19:27:07 -0300 (BRT)\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH] test thread breakage when messages are removed and\r
+ re-added\r
+In-Reply-To: <1459445693-3900-1-git-send-email-dkg@fifthhorseman.net>\r
+References: <1459445693-3900-1-git-send-email-dkg@fifthhorseman.net>\r
+User-Agent: Notmuch/0.21+74~gb409435 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 01 Apr 2016 19:27:03 -0300\r
+Message-ID: <8737r5dky0.fsf@alice.fifthhorseman.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+ micalg=pgp-sha512; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 02 Apr 2016 01:50:21 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+\r
+On Thu 2016-03-31 14:34:53 -0300, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:\r
+> ghost-on-removal\r
+> ----------------\r
+>\r
+> We could unilaterally add a ghost upon message removal. This has a\r
+> few disadvantages: the message index would leak information about what\r
+> messages the user has ever been exposed to, and we also create a\r
+> perpetually-growing dataset -- the ghosts can never be removed.\r
+>\r
+> ghost-on-removal-when-shared-thread-exists\r
+> ------------------------------------------\r
+>\r
+> We could add a ghost upon message removal iff there are other\r
+> non-ghost messages with the same thread ID.\r
+>\r
+> We'd also need to remove all ghost messages that share a thread when\r
+> the last non-ghost message in that thread is removed.\r
+>\r
+> This still has a bit of information leakage, though: the message index\r
+> would reveal that i've seen a newer message in a thread, even if i had\r
+> deleted it from my message store\r
+\r
+One more proposal along these lines:\r
+\r
+track-non-ghost-count-per-thread\r
+--------------------------------\r
+\r
+If each thread had a count of all the non-ghost messages associated with\r
+it, and that count was properly maintained by the database, then upon\r
+message deletion you would decrement the count. when that count reached\r
+zero, you could destroy the thread.\r
+\r
+This has the same metadata leakage as\r
+ghost-on-removal-when-shared-thread-exists, but i think it might be more\r
+efficient, if we can cope with the denormalized database.\r
+\r
+This does have the downside of needing a database transition, though:\r
+we'd have to add this count to all threads in a database upgrade.\r
+\r
+\r
+\r
+What do people think of the different options? what do you prefer? is\r
+there some better approach that i've missed?\r
+\r
+ --dkg\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2\r
+\r
+iQJ8BAEBCgBmBQJW/vW3XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\r
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFREIyRTc0RjU2RkNGMkI2NzI5N0I3MzUy\r
+NEVDRkY1QUZGNjgzNzBBAAoJECTs/1r/aDcKBFwP/3fiBCcA2W5KWe4R02JtO7qg\r
+IuekGdsb95+HfauCrfdY5QQgSRmd6uIMniJkyZ9Zj4ccKEjPLDJ3nqn2M2xBHOzM\r
+4j0b4CHmnhDZkNZAKgQCBjMMJVJ1qm4tTV380p1GOyChvQdxEHAelM3tT18rK/22\r
+ynmBJ8bCzMJ4RjG1rfLWqc9DA78AZCVxPj2Ikc+jKBRFc6UvdtOq5/dCgkykOfTV\r
+lXFvO1BWwkH/6E9xijg7bl6sMGUsJzdLq0Jc5pTRYCyAMMv5DQlj1JllvQAXKYCO\r
+9v8ZVYCOPHrCF4BMrBldmOhK+aghbzYYzhLG77PKqwr0l2XsOtvwwD6A1L4Lo26O\r
+vCY8sZUVWfzzL7hnvRaJhLxCiiTObjhN8GtpG/QpsQmOLw7uxbtIWx8OnDRmdQMJ\r
+pWjjNyDFdvbw/3fogUoGpUHxB28cyDQ/rvASNDgE1pOQWkD1BM7fMShcc7F0g+tn\r
+mpxpmmawFqrWA1pYiral/NL6MyPSIGWLZNfL0fYJbgX0aKB2Dpl4l+Pa4ZmbIxX1\r
+bKkMahrQdoTPZOD4LmUov2aRSl4vMXjnJIlaHRqX70xk/E/dpkRA64XMNSAKtaCt\r
+h5kYUNF4XnUUsEiknZYALCZfPmbMNfLw8GTJ+lGjEJRfGUBqBmh884SEcAklpOxi\r
+JGbYC7K7Dr/IY75zMVMj\r
+=TWtC\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r