unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <aclements@csail.mit.edu>
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	[thread overview]
Message-ID: <1412345958-8278-6-git-send-email-aclements@csail.mit.edu> (raw)
In-Reply-To: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu>

From: Austin Clements <amdragon@mit.edu>

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

  parent reply	other threads:[~2014-10-03 14:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 14:19 [PATCH 00/11] Add ghost messages and fix thread linking Austin Clements
2014-10-03 14:19 ` [PATCH 01/11] lib: Move message ID compression to _notmuch_message_create_for_message_id Austin Clements
2014-10-03 14:19 ` [PATCH 02/11] lib: Refactor _notmuch_database_link_message Austin Clements
2014-10-05  7:45   ` David Bremner
2014-10-05 23:20     ` Austin Clements
2014-10-06  6:04       ` David Bremner
2014-10-06 13:25         ` Austin Clements
2014-10-03 14:19 ` [PATCH 03/11] lib: Handle empty date value Austin Clements
2014-10-03 14:19 ` [PATCH 04/11] lib: Add a ghost messages database feature Austin Clements
2014-10-03 14:19 ` Austin Clements [this message]
2014-10-03 14:19 ` [PATCH 06/11] lib: Internal support for querying and creating ghost messages Austin Clements
2014-10-05  8:30   ` David Bremner
2014-10-05 23:24     ` Austin Clements
2014-10-06  6:19       ` David Bremner
2014-10-06 16:03         ` Austin Clements
2014-10-03 14:19 ` [PATCH 07/11] lib: Implement ghost-based thread linking Austin Clements
2014-10-03 14:19 ` [PATCH 08/11] lib: Implement upgrade to ghost messages feature Austin Clements
2014-10-05  8:56   ` David Bremner
2014-10-05 23:29     ` Austin Clements
2014-10-06  6:03       ` David Bremner
2014-10-03 14:19 ` [PATCH 09/11] lib: Enable " Austin Clements
2014-10-03 14:19 ` [PATCH 10/11] test: Test upgrade to " Austin Clements
2014-10-03 14:19 ` [PATCH 11/11] lib: Remove unnecessary thread linking steps when using ghost messages Austin Clements
2014-10-04  8:30 ` [PATCH 00/11] Add ghost messages and fix thread linking Tomi Ollila
2014-10-04 20:15   ` Austin Clements
2014-10-05  9:07 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412345958-8278-6-git-send-email-aclements@csail.mit.edu \
    --to=aclements@csail.mit.edu \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).