Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 68602 invoked from network); 4 Feb 2009 21:36:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2009 21:36:35 -0000 Received: (qmail 71774 invoked by uid 500); 4 Feb 2009 21:36:34 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 71729 invoked by uid 500); 4 Feb 2009 21:36:34 -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 71713 invoked by uid 99); 4 Feb 2009 21:36:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 13:36:34 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.198.233 as permitted sender) Received: from [209.85.198.233] (HELO rv-out-0506.google.com) (209.85.198.233) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 21:36:26 +0000 Received: by rv-out-0506.google.com with SMTP id g37so2589407rvb.35 for ; Wed, 04 Feb 2009 13:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+9ALF3ji6SwDHEaXiygNBcdpi8Xzvaa6UdVonjCq+vQ=; b=b8/J2O1iFrhoYlOUhwnm6fbE2g7Wgty9Z7B6IG9JyM73Y9DzzvdgBJGZmUK8WW1OQO lQWr+ryxKGjJBOFG9q8qs5CWozoDBUIYJPuzc5VxxYgqWbrZnkZ/9QQDsGmwI4QcFaHu +TkqPiZVl2w+CaQCpRXn4q2Gb7OLlKlmRpHjw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SXiNa0AOhpqF6ufEGl2W3xJHA4womNxgBNyW4YqfQBz9/2wwS9HeQWPu01PYvHsj7V tNHmmc0HTaIk1wkVMXbEAov77FqY1kAf5+R7cKi+gSLaP4vBnaAeLdOCqarP9yxVIxfK 0vXXF4cx98Uq6loskHVO01pd2KAC69KxK77IM= MIME-Version: 1.0 Received: by 10.141.136.4 with SMTP id o4mr3897341rvn.90.1233783365567; Wed, 04 Feb 2009 13:36:05 -0800 (PST) In-Reply-To: References: Date: Wed, 4 Feb 2009 16:36:05 -0500 Message-ID: Subject: Re: view definition _rev behavior From: Paul Davis 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 Wed, Feb 4, 2009 at 4:16 PM, Damien Katz wrote: > 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 > An extension to Damien's idea I just thought of loading the new _design doc under a different name and generating the views. With a patch to MOVE we could also rename the view file on disk. Making sure the swap was atomic could be a PITA though. > > 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 > >