From: Austin Clements Date: Fri, 11 Jul 2014 02:57:59 +0000 (+2000) Subject: Proposal: Features instead of versions X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eb7a6996b17402fceec7fc74116a8f02d510acb0;p=notmuch-archives.git Proposal: Features instead of versions --- diff --git a/9c/7a2f6c70f63c4ba1d71db3ab2e3a7d39bada9c b/9c/7a2f6c70f63c4ba1d71db3ab2e3a7d39bada9c new file mode 100644 index 000000000..8784ec416 --- /dev/null +++ b/9c/7a2f6c70f63c4ba1d71db3ab2e3a7d39bada9c @@ -0,0 +1,115 @@ +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 AE1DE431FAF + for ; Thu, 10 Jul 2014 19:58:10 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 kObUhyMx1zbp for ; + Thu, 10 Jul 2014 19:58:04 -0700 (PDT) +Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu + [18.9.25.13]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 60D67431FAE + for ; Thu, 10 Jul 2014 19:58:04 -0700 (PDT) +X-AuditID: 1209190d-f79c06d000002f07-c7-53bf52bb490b +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-2.mit.edu (Symantec Messaging Gateway) with SMTP + id B0.50.12039.BB25FB35; Thu, 10 Jul 2014 22:58:03 -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 s6B2w2eR030201; + Thu, 10 Jul 2014 22:58:02 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s6B2w0HB014386 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Thu, 10 Jul 2014 22:58:01 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1X5R28-00061m-0b; Thu, 10 Jul 2014 22:58:00 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: Proposal: Features instead of versions +User-Agent: Notmuch/0.18+42~gfea7a41 (http://notmuchmail.org) Emacs/23.4.1 + (i486-pc-linux-gnu) +Date: Thu, 10 Jul 2014 22:57:59 -0400 +Message-ID: <87sim8ob48.fsf@awakening.csail.mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFrrEIsWRmVeSWpSXmKPExsUixCmqrbs7aH+wwafbOhZN050trt+cyezA + 5HHr/mt2j2erbjEHMEVx2aSk5mSWpRbp2yVwZcxa95SlYC9/xZoDGg2Ml3i6GDk5JARMJCa+ + 6WCGsMUkLtxbz9bFyMUhJDCbSWLtw13MEM5GRok5S18yQTinmSTm7DwEVbaEUWLN1Ltg/WwC + GhLb9i9nBLFFBKQldt6dzQpiMwsoS7xYM4Wli5GDQ1hAX2L3rQwQU1QgTuLtbRuQChYBVYk3 + s/6BdfICXfT65g4oW1Di5MwnLBBTtCRu/HvJNIGRfxaS1CwkqQWMTKsYZVNyq3RzEzNzilOT + dYuTE/PyUot0jfRyM0v0UlNKNzGCg06Sdwfju4NKhxgFOBiVeHhPrNkXLMSaWFZcmXuIUZKD + SUmU19Zif7AQX1J+SmVGYnFGfFFpTmrxIUYJDmYlEd4Z3EA53pTEyqrUonyYlDQHi5I471tr + q2AhgfTEktTs1NSC1CKYrAwHh5IE75ZAoEbBotT01Iq0zJwShDQTByfIcB6g4ZkgNbzFBYm5 + xZnpEPlTjIpS4rxhAUAJAZBERmkeXC8sKbxiFAd6RZh3Jkg7DzChwHW/AhrMBDTY2mIPyOCS + RISUVANjsdYTkTmM50W/rNrB1Vrdaxp3hmV5Y/DM0im9Rsna15fGqMep3uhIl39srcN7Y+ou + 6873ZruTz6sv+PL6vO4H0/5JZ1IfPmu8cGeucP0B7k+i3q7R233/zPJ/cWOx6ZcpNxPDq92q + 934s6V4WbXo5xURk66YHay2+xtcauuzgstn3892ioLBDSizFGYmGWsxFxYkA6mPP2+UCAAA= +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, 11 Jul 2014 02:58:11 -0000 + +I believe our current approach to database schema changes is +inhibiting the evolution of Notmuch's features and would like to +propose what I think is lighter-weight solution. + +Currently, our database schema is versioned and each database schema +change must occur "atomically" in Notmuch's development history: +before some commit, Notmuch uses version N, after that commit, it uses +version N+1. Hence, each new schema version can introduce only one +change, the task of developing a schema change falls on a single +person, and it must all happen and be perfect in a single commit +series. This makes introducing a new schema version hard. We've seen +only two schema changes in the history of Notmuch. + +I'd like to propose that we switch to a "feature set", recorded in a +database field. The recent introduction of boolean folder terms would +be a "feature" (and the lack of that feature would imply probabilistic +folder terms). Likewise, the file terms added in version 1 would be a +"feature". + +The upgrade process would be structured around the delta between the +database's feature set and the desired feature set. For many things, +it would be easy to support databases both with and without a feature, +which would enable "unstable" features that can be developed and +tested over time, and different features could be under development in +parallel. We can also mark features as required or optional for +opening the database in read mode and replace our current unknown +version warning (which the user can't act on in any useful way) with +either no warning or a straight failure. + +I've done some of this for my ghost messages support (restructuring +upgrade, unstable features, and supporting both the current schema and +the new schema), and it was simple and worked nicely. This is also very +similar to how ext4 works [1]. + +Thoughts? + + +[1] https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#The_Super_Block +fields 0x5C through 0x64.