1 Return-Path: <aclements@csail.mit.edu>
\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 olra.theworths.org (Postfix) with ESMTP id 18B53431FD6
\r
6 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 16:17:34 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id HY3q7skp5BQI for <notmuch@notmuchmail.org>;
\r
16 Mon, 6 Oct 2014 16:17:30 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id EF57B431FB6
\r
22 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 16:17:26 -0700 (PDT)
\r
23 X-AuditID: 1209190d-f79c06d000006f95-00-543323066424
\r
24 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
25 (using TLS with cipher AES256-SHA (256/256 bits))
\r
26 (Client did not present a certificate)
\r
27 by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP
\r
28 id F3.74.28565.60323345; Mon, 6 Oct 2014 19:17:26 -0400 (EDT)
\r
29 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
30 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s96NHPuX032088;
\r
31 Mon, 6 Oct 2014 19:17:25 -0400
\r
32 Received: from drake.dyndns.org ([12.185.136.2]) (authenticated bits=0)
\r
33 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
34 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s96NHMGb014463
\r
35 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);
\r
36 Mon, 6 Oct 2014 19:17:24 -0400
\r
37 Received: from amthrax by drake.dyndns.org with local (Exim 4.84)
\r
38 (envelope-from <aclements@csail.mit.edu>)
\r
39 id 1XbHWr-0001JZ-S9; Mon, 06 Oct 2014 17:17:21 -0600
\r
40 From: Austin Clements <aclements@csail.mit.edu>
\r
41 To: notmuch@notmuchmail.org
\r
42 Subject: [PATCH v2 05/12] lib: Update database schema doc for ghost messages
\r
43 Date: Mon, 6 Oct 2014 17:17:11 -0600
\r
44 Message-Id: <1412637438-4821-6-git-send-email-aclements@csail.mit.edu>
\r
45 X-Mailer: git-send-email 2.1.0
\r
46 In-Reply-To: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu>
\r
47 References: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu>
\r
48 X-Brightmail-Tracker:
\r
49 H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6nrsumbBxisOUWv8WN1m5Gi+s3ZzI7
\r
50 MHk8W3WL2WPLoffMAUxRXDYpqTmZZalF+nYJXBn/Zm5kK5jJX9G05z9jA+Nf7i5GTg4JAROJ
\r
51 0z/3MELYYhIX7q1nA7GFBGYzSax7INPFyAVkb2CU2DChiRnCWcok8e/wfyYIZwmjxNx5H5hA
\r
52 WtgE9CVWrJ3ECmKLCEhL7Lw7G8xmFrCUuPq1HaxGWMBHonPyA7AVLAKqEgs2bgKzeQXcJI69
\r
53 esQKcYacxIbd/8FO4hRwl1hzZTIrxEluEs9/PmWZwMi/gJFhFaNsSm6Vbm5iZk5xarJucXJi
\r
54 Xl5qka6RXm5miV5qSukmRlAocUry7mB8d1DpEKMAB6MSD2/EDsMQIdbEsuLK3EOMkhxMSqK8
\r
55 c9iNQ4T4kvJTKjMSizPii0pzUosPMUpwMCuJ8HL9NgoR4k1JrKxKLcqHSUlzsCiJ8276wRci
\r
56 JJCeWJKanZpakFoEk5Xh4FCS4DVWAhoqWJSanlqRlplTgpBm4uAEGc4DNPyfIlANb3FBYm5x
\r
57 ZjpE/hSjopQ4bzBIQgAkkVGaB9cLi/VXjOJArwjzBoGs4AGmCbjuV0CDmYAGm87RBxlckoiQ
\r
58 kmpgDN2j9bdnTWet2dnO+PeCMo8ZAowFxJVqNZ//XnTZJbTsrt4dpf/P3dtL5dyq1xtON+E1
\r
59 Zz+wsdVlRqvvQdVbInuvpNQ8aRGqOHdh4eX+uFv7rqnP6fbduvbey5cnuRefDX3P7HrCNM8u
\r
60 Piz3jPhFE8Xiw9+4mSLuyrp7KIkLyc8+fsPa/1+/EktxRqKhFnNRcSIA0tlvAdACAAA=
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Mon, 06 Oct 2014 23:17:34 -0000
\r
75 From: Austin Clements <amdragon@mit.edu>
\r
77 This describes the structure of ghost mail documents. Ghost messages
\r
78 are not yet implemented.
\r
80 lib/database.cc | 20 ++++++++++++++++++--
\r
81 1 file changed, 18 insertions(+), 2 deletions(-)
\r
83 diff --git a/lib/database.cc b/lib/database.cc
\r
84 index 8fd7fad..c641bcd 100644
\r
85 --- a/lib/database.cc
\r
86 +++ b/lib/database.cc
\r
87 @@ -50,8 +50,8 @@ typedef struct {
\r
89 /* Here's the current schema for our database (for NOTMUCH_DATABASE_VERSION):
\r
91 - * We currently have two different types of documents (mail and
\r
92 - * directory) and also some metadata.
\r
93 + * We currently have three different types of documents (mail, ghost,
\r
94 + * and directory) and also some metadata.
\r
98 @@ -109,6 +109,15 @@ typedef struct {
\r
100 * The data portion of a mail document is empty.
\r
102 + * Ghost mail document [if NOTMUCH_FEATURE_GHOSTS]
\r
103 + * -----------------------------------------------
\r
104 + * A ghost mail document is like a mail document, but where we don't
\r
105 + * have the message content. These are used to track thread reference
\r
106 + * information for messages we haven't received.
\r
108 + * A ghost mail document has type: ghost; id and thread fields that
\r
109 + * are identical to the mail document fields; and a MESSAGE_ID value.
\r
111 * Directory document
\r
112 * ------------------
\r
113 * A directory document is used by a client of the notmuch library to
\r
114 @@ -172,6 +181,13 @@ typedef struct {
\r
115 * generated is 1 and the value will be
\r
116 * incremented for each thread ID.
\r
118 + * Obsolete metadata
\r
119 + * -----------------
\r
121 + * If ! NOTMUCH_FEATURE_GHOSTS, there are no ghost mail documents.
\r
122 + * Instead, the database has the following additional database
\r
125 * thread_id_* A pre-allocated thread ID for a particular
\r
126 * message. This is actually an arbitrarily large
\r
127 * family of metadata name. Any particular name is
\r