From user-return-18976-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Nov 30 20:48:39 2011 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9128B9EB2 for ; Wed, 30 Nov 2011 20:48:39 +0000 (UTC) Received: (qmail 13612 invoked by uid 500); 30 Nov 2011 20:48:38 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 13577 invoked by uid 500); 30 Nov 2011 20:48:37 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 13569 invoked by uid 99); 30 Nov 2011 20:48:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 20:48:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dave@muse.net.nz designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 20:48:28 +0000 Received: by vbbfk1 with SMTP id fk1so1136217vbb.11 for ; Wed, 30 Nov 2011 12:48:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.173.197 with SMTP id bm5mr3630796vdc.7.1322686086236; Wed, 30 Nov 2011 12:48:06 -0800 (PST) Received: by 10.52.30.52 with HTTP; Wed, 30 Nov 2011 12:48:06 -0800 (PST) X-Originating-IP: [84.172.67.25] In-Reply-To: References: <4ED6233E.3040909@narhinen.net> Date: Wed, 30 Nov 2011 21:48:06 +0100 Message-ID: Subject: Re: Rapid deployment with CouchDB (problem with view updates) From: Dave Cottlehuber To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 30 November 2011 16:23, Zachary Zolton wrote: > Niklas, > > The best way I have found to deal with this is to add these steps to > my deployment procedures: > > =A0* push the new design doc as _design/your_ddoc_name-prime > =A0* query any view from that _design/your_ddoc_name-prime with ?limit=3D= 1 > =A0* wait for the view query results > =A0* push the new design doc again as _design/your_ddoc_name > =A0* finally, switch over to the new version of your application code > > This doesn't require any special knowledge in your clients, since they > always query _design/your_ddoc_name. > > I've used this approach several times and it works like a charm. Yes, > you'll have to write a small script, but it's really not that bad. > > --Zach It's so short I don't think anybody saw a need to write a separate tool for= it. http://wiki.apache.org/couchdb/How_to_deploy_view_changes_in_a_live_environ= ment A+ Dave