Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 51924 invoked from network); 4 Feb 2009 21:16:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2009 21:16:54 -0000 Received: (qmail 43437 invoked by uid 500); 4 Feb 2009 21:16:53 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 43405 invoked by uid 500); 4 Feb 2009 21:16:52 -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 43394 invoked by uid 99); 4 Feb 2009 21:16:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 13:16:52 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.68.5.15] (HELO relay01.pair.com) (209.68.5.15) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 04 Feb 2009 21:16:43 +0000 Received: (qmail 11141 invoked from network); 4 Feb 2009 21:16:20 -0000 Received: from 96.33.90.152 (HELO ?192.168.1.195?) (96.33.90.152) by relay01.pair.com with SMTP; 4 Feb 2009 21:16:20 -0000 X-pair-Authenticated: 96.33.90.152 Message-Id: From: Damien Katz To: dev@couchdb.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: view definition _rev behavior Date: Wed, 4 Feb 2009 16:16:20 -0500 References: X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org This would certainly be a nice thing to have, but you can get pretty much the same behavior by simply using a new design document id. -Damien On Feb 4, 2009, at 4:05 PM, Chris Anderson wrote: > Devs, > > One of the longstanding issues with CouchDB has been, how to handle > changes in view definitions. > > If you are exposing CouchDB view URLs to end users, you don't have the > luxury of controlling where applications query, so using a version > number in the design doc name is not feasible. > > The work around I came up with in the last couple of days (no patch, > just an idea) is to continue to maintain and serve the existing view > index, while the index for the new view definitions comes up to date. > (For apps that can't accept this relaxed guarantee, we could have an > X-Couch-Wait-For-Latest-View=true header.) > > The edge case that I'd like to get right, before implementing, is that > you may be rolling out other code in the design doc, that depends on > the the new view. To get this really slick, we'd want to continue to > serve the old design docs attachments, lists, validations, shows, > etc., until the new view is ready for queries. That way all the code > rolls over at the same time, when the new views are ready. > > Getting this right is not impossible but will require some thinking. > Particularly we want to avoid serving old design docs when the changes > don't effect the view index. Also compacting away the old design doc, > could be a nasty surprise. > > I think there could be a big usability payoff here if we get this > right - feedback welcome. > > Chris > > -- > Chris Anderson > http://jchris.mfdz.com