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 61E17431FD7 for ; Thu, 23 Oct 2014 05:31:01 -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 uyJFLH0BxbSu for ; Thu, 23 Oct 2014 05:30:55 -0700 (PDT) Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu [18.7.68.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 83F75431FDB for ; Thu, 23 Oct 2014 05:30:52 -0700 (PDT) X-AuditID: 12074425-f79e46d000002583-91-5448f4fb4426 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-8.mit.edu (Symantec Messaging Gateway) with SMTP id 3C.F4.09603.BF4F8445; Thu, 23 Oct 2014 08:30:51 -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 s9NCUm1e030502; Thu, 23 Oct 2014 08:30:48 -0400 Received: from drake.dyndns.org (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [216.15.114.40]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s9NCUhdb008928 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 23 Oct 2014 08:30:46 -0400 Received: from amthrax by drake.dyndns.org with local (Exim 4.84) (envelope-from ) id 1XhHXP-0007bg-6q; Thu, 23 Oct 2014 08:30:43 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH v3 2/9] lib: Update database schema doc for ghost messages Date: Thu, 23 Oct 2014 08:30:34 -0400 Message-Id: <1414067441-29054-3-git-send-email-aclements@csail.mit.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1414067441-29054-1-git-send-email-aclements@csail.mit.edu> References: <1414067441-29054-1-git-send-email-aclements@csail.mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6nrvv7i0eIwdSHxhar5/JYXL85k9mB yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgyvg3cyNbwUz+iqY9/xkbGP9ydzFyckgImEg8 OLuUFcIWk7hwbz1bFyMXh5DAbCaJP7ueMkE4GxklDjzZwQjh3GGSaP7Zwg7hLGGU6LjdwQjS zyagL7Fi7SSwWSIC0hI7784Gs5kFHCU+71/EBmILC3hJLDrxCKyeRUBVYmZLP5jNK+AucWTi IiaIO+QkNuz+DxbnFPCQ2LPjDlivEFDN9ucHWScw8i9gZFjFKJuSW6Wbm5iZU5yarFucnJiX l1qka6GXm1mil5pSuokRHEouqjsYJxxSOsQowMGoxMN7IdUjRIg1say4MvcQoyQHk5Iob8wD oBBfUn5KZUZicUZ8UWlOavEhRgkOZiUR3vgLQDnelMTKqtSifJiUNAeLkjjvph98IUIC6Ykl qdmpqQWpRTBZGQ4OJQleRmDMCAkWpaanVqRl5pQgpJk4OEGG8wANv/UZZHhxQWJucWY6RP4U o6KUOG8ySEIAJJFRmgfXC4v1V4ziQK8I86qBrOABpgm47ldAg5lArt4ANrgkESEl1cA4q3Tr hfxVa9ZXLjle3L70w6Td9l+irnE6XA+dOvXP7hcKknwufsmzBI9Mtr+/w+rxX+Ub9ZrpPZGL zq2J9pX619et8nE+72nNKLO4XL7jfDv7Nh+z5PtnIvzYNE/k16+fGqHWHE0HpQObc05prtqw r0jp8aN/jyps3itb3S54cKOwaa2Y5Q1/JZbijERDLeai4kQAWv7LkdACAAA= 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: Thu, 23 Oct 2014 12:31:01 -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