1 Return-Path: <david@tethera.net>
\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 56218431FB6
\r
6 for <notmuch@notmuchmail.org>; Sat, 23 Aug 2014 15:21:25 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 Tp059WRUnxwx for <notmuch@notmuchmail.org>;
\r
16 Sat, 23 Aug 2014 15:21:18 -0700 (PDT)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 3EA37431FAF
\r
21 for <notmuch@notmuchmail.org>; Sat, 23 Aug 2014 15:21:18 -0700 (PDT)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <david@tethera.net>)
\r
24 id 1XLJgP-0002Jr-3V; Sat, 23 Aug 2014 19:21:13 -0300
\r
25 Received: (nullmailer pid 18176 invoked by uid 1000); Sat, 23 Aug 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
\r
29 Subject: Re: [PATCH v3 04/13] lib: Database version 3: Introduce fine-grained
\r
31 In-Reply-To: <1406859003-11561-5-git-send-email-amdragon@mit.edu>
\r
32 References: <1406859003-11561-1-git-send-email-amdragon@mit.edu>
\r
33 <1406859003-11561-5-git-send-email-amdragon@mit.edu>
\r
34 User-Agent: Notmuch/0.18.1+72~g028c560 (http://notmuchmail.org) Emacs/24.3.1
\r
35 (x86_64-pc-linux-gnu)
\r
36 Date: Sat, 23 Aug 2014 15:21:07 -0700
\r
37 Message-ID: <87ppfqsv8s.fsf@maritornes.cs.unb.ca>
\r
39 Content-Type: text/plain
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Sat, 23 Aug 2014 22:21:25 -0000
\r
54 Austin Clements <amdragon@MIT.EDU> writes:
\r
56 > + /* Bit mask of features used by this database. Features are
\r
57 > + * named, independent aspects of the database schema. This is a
\r
58 > + * bitwise-OR of NOTMUCH_FEATURE_* values (below). */
\r
59 > + unsigned int features;
\r
61 Should we be using a fixed size integer (uint_32t or whatever) for
\r
62 features? iirc the metadata in the database is actually a string, so I
\r
63 guess arbitrary precision there.
\r
65 > +/* Bit masks for _notmuch_database::features. */
\r
67 > + /* If set, file names are stored in "file-direntry" terms. If
\r
68 > + * unset, file names are stored in document data.
\r
70 > + * Introduced: version 1. Implementation support: both for read;
\r
71 > + * required for write. */
\r
72 > + NOTMUCH_FEATURE_FILE_TERMS = 1 << 0,
\r
74 I agree with Jani that the Implementation support: part is a bit
\r
75 mystifying without the commit message. Maybe part of the commit message
\r
76 could migrate here? Or maybe just add a pointer to the comment in database.cc.
\r
78 > + if (! *incompat_out)
\r
80 Should we support passing NULL for incompat_out? or at least check for
\r
83 > @@ -1048,7 +1164,8 @@ notmuch_database_get_version (notmuch_database_t *notmuch)
\r
85 > notmuch_database_needs_upgrade (notmuch_database_t *notmuch)
\r
87 > - return notmuch->needs_upgrade;
\r
88 > + return notmuch->mode == NOTMUCH_DATABASE_MODE_READ_WRITE &&
\r
89 > + (NOTMUCH_FEATURES_CURRENT & ~notmuch->features);
\r
92 Maybe I'm not thinking hard enough here, but how does this deal with a
\r
93 feature that is needed to open a database in read only mode? Maybe it
\r
94 needs a comment for people not as clever as Austin ;).
\r