Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 70795 invoked from network); 12 Apr 2009 00:21:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2009 00:21:02 -0000 Received: (qmail 49812 invoked by uid 500); 12 Apr 2009 00:21:01 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 49711 invoked by uid 500); 12 Apr 2009 00:21:00 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 49701 invoked by uid 99); 12 Apr 2009 00:21:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Apr 2009 00:21:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jchris@gmail.com designates 209.85.219.166 as permitted sender) Received: from [209.85.219.166] (HELO mail-ew0-f166.google.com) (209.85.219.166) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Apr 2009 00:20:51 +0000 Received: by ewy10 with SMTP id 10so1774952ewy.11 for ; Sat, 11 Apr 2009 17:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=hd0zm654wlacYgJ0VIHrWEqW6B6VMoFDUaIFRR6b4jo=; b=QSgFQveV52Stb9RZ90/WezmeRPS02zE29wCCskq0eNW6nC08jYWt2OWk8HNw2P5ccx 6hTaqxdiyY2D4lH3uZ3iUlwmKgpSoJFUxXkrEoG6K7K2qJDyNzUGaz/aKK3lKGK6zsrx VvutTgxvbWhahCVC7BF4FDgPT9LSfVVkhKhrg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=wZGSRZeYJAMLFHioUDnKYy+8OnsxwEKAFYQ0vpGZl17C9A2Y2w9lYHZYRf+KRYlc+Q uUOgWk0yZfGdyphyDGeIgQ3vZv6N6rUPC0vK6SuiEA3cxqhkjqJS0NdOn6tzDiFTmDaz jv0ICguXrAkEVWJmWRJkIbwn5lTtEcPyzaV8g= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.210.58.17 with SMTP id g17mr4101674eba.47.1239495630598; Sat, 11 Apr 2009 17:20:30 -0700 (PDT) In-Reply-To: References: <46aeb24f0904111535w12dbad5t667065897a8560b1@mail.gmail.com> Date: Sat, 11 Apr 2009 17:20:30 -0700 X-Google-Sender-Auth: b6fa11b2a7458056 Message-ID: Subject: Re: db-options From: Chris Anderson To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Sat, Apr 11, 2009 at 5:08 PM, Paul Davis wrote: > On Sat, Apr 11, 2009 at 7:23 PM, Chris Anderson wrote: >> On Sat, Apr 11, 2009 at 3:35 PM, Robert Newson wrote: >>> Devs, >>> >>> Following a brief discussion on IRC, I wanted to hear general thoughts >>> and objections to introducing creation-time database options. That is, >>> allow couchdb databases to toggle some features on or off on a >>> per-database basis. Additionally, these options could be changed at >>> compaction time. >>> >>> The first concrete example of such an option would be a feature that >>> introduces single-instance storage of attachments. Namely, the >>> addition of another btree keyed on the sha1 evaluation of attachments. >>> The tree would be used to ensure only one copy of any particular >>> attachment exists in the database file. This option could be added or >>> removed during compaction also. >>> >>> Thoughts? >> >> I think this is a great idea. I'd suggest keeping the db-options in >> the #db_header record. Which could get problematic if there get to be >> so many options that the header size starts to grow. Maybe there's a >> better answer, but this seems most straightforward. >> > > There's also _local/ documents so that changes to config options don't > cause binary incompatibilities. > >> We don't want the binary storage mechanism to be able to change except at the beginning of compaction. So for these types of config it should be baked into the file. Otherwise editing the _local/db-config doc could corrupt your database. There are a class on configs that could go in local docs, but most of those seem better suited for local.ini (imagine an auto-compaction setting or the rev-stemming threshold). -- Chris Anderson http://jchrisa.net http://couch.io