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 81FEA80CF for ; Fri, 9 Sep 2011 08:22:57 +0000 (UTC) Received: (qmail 87536 invoked by uid 500); 9 Sep 2011 07:22:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 87043 invoked by uid 500); 9 Sep 2011 07:22:36 -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 86875 invoked by uid 99); 9 Sep 2011 07:22:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 07:22:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of randall.leeds@gmail.com designates 209.85.218.45 as permitted sender) Received: from [209.85.218.45] (HELO mail-yi0-f45.google.com) (209.85.218.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 07:22:22 +0000 Received: by yib2 with SMTP id 2so675134yib.32 for ; Fri, 09 Sep 2011 00:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=LGVVxitFysTBZThbZRitHQcSKEE7ksUbAQz7l4yVhxI=; b=MQrMqbybkOW+x5k7zDhQyOOx9fZIE3mzjD18oBSZEMzSRGhhDUhSSPuT7/3gUBm2zv is9uwqG9gtty1DDxHa7F0ILLFy5yIPVRfR61Br+wME6sjbWZs+5KF4x6ReAFn0S4XyiI 92poknLiuX4tL8+urz9Gkh31/9NSao2GwrZPU= MIME-Version: 1.0 Received: by 10.42.243.67 with SMTP id ll3mr786373icb.521.1315552921680; Fri, 09 Sep 2011 00:22:01 -0700 (PDT) Received: by 10.42.226.73 with HTTP; Fri, 9 Sep 2011 00:22:01 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Sep 2011 00:22:01 -0700 Message-ID: Subject: Re: What's the best way to jack up the rev number? From: Randall Leeds To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=00235445bb789479f604ac7d08a3 X-Virus-Checked: Checked by ClamAV on apache.org --00235445bb789479f604ac7d08a3 Content-Type: text/plain; charset=UTF-8 On Mon, Aug 22, 2011 at 02:03, Jason Smith wrote: > On Mon, Aug 22, 2011 at 12:04 PM, Ryan Ramage > wrote: > > How to I grant mega points for a fantastic answer? Thanks Jason. > > > > A summary from the link....I have a master couchapp that clients pull > > replicate from. A refactoring of the couchapp may mess up the rev number > for > > the main design doc. So i need a way to go past the rev number to force > an > > update to the clients. Is there a better way? > > Maybe a few ideas? > Here's another nasty way to trick CouchDB, just for fun: PUT the new version of the document with whatever _rev you want and put ?new_edits=false in the query string. Couch will accept the new revision no matter what. Replication uses this feature to bypass the conflict rejections and merge conflicting trees. Choose whatever number you feel like and abuse the definition of "winning" revision so your newest one is what shows up :). You should still DELETE the old revisions or you'll proliferate conflicts and that puts unnecessary burden on couch in some places. -Randall --00235445bb789479f604ac7d08a3--