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 B5FED431FC0 for ; Fri, 3 Oct 2014 07:19:38 -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 MqKcR4g5aw01 for ; Fri, 3 Oct 2014 07:19:32 -0700 (PDT) Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu [18.9.25.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D09B0431FCB for ; Fri, 3 Oct 2014 07:19:25 -0700 (PDT) X-AuditID: 1209190c-f795e6d000006c66-53-542eb06c3c9d Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id 74.34.27750.C60BE245; Fri, 3 Oct 2014 10:19:24 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s93EJN9t018545; Fri, 3 Oct 2014 10:19:23 -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 s93EJLIo023314 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 3 Oct 2014 10:19:22 -0400 Received: from amthrax by drake.dyndns.org with local (Exim 4.84) (envelope-from ) id 1Xa3hZ-0002Js-5M; Fri, 03 Oct 2014 10:19:21 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 05/11] lib: Update database schema doc for ghost messages Date: Fri, 3 Oct 2014 10:19:12 -0400 Message-Id: <1412345958-8278-6-git-send-email-aclements@csail.mit.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu> References: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsUixCmqrZuzQS/EYNVZcYvrN2cyOzB6PFt1 izmAMYrLJiU1J7MstUjfLoEr49/MjWwFM/krmvb8Z2xg/MvdxcjJISFgInFy00YWCFtM4sK9 9WxdjFwcQgKzmSSmnvvEDJIQEtjAKDFhSQJE4jaTxL3W3YwQzhJGidm3jzKCVLEJ6EusWDuJ FcQWEZCW2Hl3NpDNwcEsoCbxp0sFJCws4Ckx99VhsG0sAqoSB7cfAGvlFXCTuL/hEBPEFXIS G3b/B4tzCrhLXLj7lA3iCDeJVce62SYw8i9gZFjFKJuSW6Wbm5iZU5yarFucnJiXl1qka6iX m1mil5pSuokRHDSSPDsY3xxUOsQowMGoxMP74YZuiBBrYllxZe4hRkkOJiVR3srFeiFCfEn5 KZUZicUZ8UWlOanFhxglOJiVRHgXrATK8aYkVlalFuXDpKQ5WJTEeTf94AsREkhPLEnNTk0t SC2CycpwcChJ8LavB2oULEpNT61Iy8wpQUgzcXCCDOcBGg5Ww1tckJhbnJkOkT/FqCglzvtw HVBCACSRUZoH1wuL6leM4kCvCPN2gbTzABMCXPcroMFMQIPf2euCDC5JREhJNTCKMc7m6f56 yr2YgWm9sNsuobtLo5r8d3eFFM9JW8V0TWh1xDZRIaU2zXueuUIe6dt1D8YGHv+ibPPB5phl myqXup4tV+vx1Fseq/5urdXI2hgoOz/pT+/E4PcPrj6/abHz+4Oli9kOFjQ8er1W0qyloahv iVjY9x/K52+Fenr1J9cuPh9lf0aJpTgj0VCLuag4EQBg99rnxQIAAA== 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: Fri, 03 Oct 2014 14:19:38 -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