Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 18B53431FD6 for ; Mon, 6 Oct 2014 16:17:34 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HY3q7skp5BQI for ; Mon, 6 Oct 2014 16:17:30 -0700 (PDT) Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu [18.9.25.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id EF57B431FB6 for ; Mon, 6 Oct 2014 16:17:26 -0700 (PDT) X-AuditID: 1209190d-f79c06d000006f95-00-543323066424 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP id F3.74.28565.60323345; Mon, 6 Oct 2014 19:17:26 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s96NHPuX032088; Mon, 6 Oct 2014 19:17:25 -0400 Received: from drake.dyndns.org ([12.185.136.2]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s96NHMGb014463 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 6 Oct 2014 19:17:24 -0400 Received: from amthrax by drake.dyndns.org with local (Exim 4.84) (envelope-from ) id 1XbHWr-0001JZ-S9; Mon, 06 Oct 2014 17:17:21 -0600 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH v2 05/12] lib: Update database schema doc for ghost messages Date: Mon, 6 Oct 2014 17:17:11 -0600 Message-Id: <1412637438-4821-6-git-send-email-aclements@csail.mit.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu> References: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6nrsumbBxisOUWv8WN1m5Gi+s3ZzI7 MHk8W3WL2WPLoffMAUxRXDYpqTmZZalF+nYJXBn/Zm5kK5jJX9G05z9jA+Nf7i5GTg4JAROJ 0z/3MELYYhIX7q1nA7GFBGYzSax7INPFyAVkb2CU2DChiRnCWcok8e/wfyYIZwmjxNx5H5hA WtgE9CVWrJ3ECmKLCEhL7Lw7G8xmFrCUuPq1HaxGWMBHonPyA7AVLAKqEgs2bgKzeQXcJI69 esQKcYacxIbd/8FO4hRwl1hzZTIrxEluEs9/PmWZwMi/gJFhFaNsSm6Vbm5iZk5xarJucXJi Xl5qka6RXm5miV5qSukmRlAocUry7mB8d1DpEKMAB6MSD2/EDsMQIdbEsuLK3EOMkhxMSqK8 c9iNQ4T4kvJTKjMSizPii0pzUosPMUpwMCuJ8HL9NgoR4k1JrKxKLcqHSUlzsCiJ8276wRci JJCeWJKanZpakFoEk5Xh4FCS4DVWAhoqWJSanlqRlplTgpBm4uAEGc4DNPyfIlANb3FBYm5x ZjpE/hSjopQ4bzBIQgAkkVGaB9cLi/VXjOJArwjzBoGs4AGmCbjuV0CDmYAGm87RBxlckoiQ kmpgDN2j9bdnTWet2dnO+PeCMo8ZAowFxJVqNZ//XnTZJbTsrt4dpf/P3dtL5dyq1xtON+E1 Zz+wsdVlRqvvQdVbInuvpNQ8aRGqOHdh4eX+uFv7rqnP6fbduvbey5cnuRefDX3P7HrCNM8u Piz3jPhFE8Xiw9+4mSLuyrp7KIkLyc8+fsPa/1+/EktxRqKhFnNRcSIA0tlvAdACAAA= X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Mon, 06 Oct 2014 23:17:34 -0000 From: Austin Clements This describes the structure of ghost mail documents. Ghost messages are not yet implemented. --- lib/database.cc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 8fd7fad..c641bcd 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -50,8 +50,8 @@ typedef struct { /* Here's the current schema for our database (for NOTMUCH_DATABASE_VERSION): * - * We currently have two different types of documents (mail and - * directory) and also some metadata. + * We currently have three different types of documents (mail, ghost, + * and directory) and also some metadata. * * Mail document * ------------- @@ -109,6 +109,15 @@ typedef struct { * * The data portion of a mail document is empty. * + * Ghost mail document [if NOTMUCH_FEATURE_GHOSTS] + * ----------------------------------------------- + * A ghost mail document is like a mail document, but where we don't + * have the message content. These are used to track thread reference + * information for messages we haven't received. + * + * A ghost mail document has type: ghost; id and thread fields that + * are identical to the mail document fields; and a MESSAGE_ID value. + * * Directory document * ------------------ * A directory document is used by a client of the notmuch library to @@ -172,6 +181,13 @@ typedef struct { * generated is 1 and the value will be * incremented for each thread ID. * + * Obsolete metadata + * ----------------- + * + * If ! NOTMUCH_FEATURE_GHOSTS, there are no ghost mail documents. + * Instead, the database has the following additional database + * metadata: + * * thread_id_* A pre-allocated thread ID for a particular * message. This is actually an arbitrarily large * family of metadata name. Any particular name is -- 2.1.0