Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 47689 invoked from network); 5 Apr 2011 21:47:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Apr 2011 21:47:03 -0000 Received: (qmail 72258 invoked by uid 500); 5 Apr 2011 21:47:01 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 72227 invoked by uid 500); 5 Apr 2011 21:47:01 -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 72219 invoked by uid 99); 5 Apr 2011 21:47:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2011 21:47:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,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 luismiguelferreirasilva@gmail.com designates 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pw0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2011 21:46:54 +0000 Received: by pwi4 with SMTP id 4so602074pwi.11 for ; Tue, 05 Apr 2011 14:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=vEbYtrJ7PBYcr41D18A/pCbTDLME8EM0Bl9VGlG9gzI=; b=ONouFlrmFAuYgwuywJCYnJeNO00EJR9ddPMWEUSYVHbiLkHX/IzwL6tyjOC+Ns6+yw pLXqTL1hQlYmaVP17LRoXRQhLk6wqtiMpkdaOvC9msP1lQXDIoQfg4rLG3jkpJXr54VZ rqzCCAJqYXPHRpxK0RgdyOaqdrDlJPeSKbY7s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=js6UcFtXdQQtYxefLpwgC8NTIWcGQ7Vf48CuIUv7PYGVnIC9HlxtpEEFwa57V50EqH C4F4XvaBJcovZOzsOKa0pGu+rnvxDaFleYeWsoxBfsSGQMvq3nmIcqYMuGckGbWNA0+N QVPl81VHI83zMJEhAqiFyjNJTjorTWAlxp088= Received: by 10.142.240.17 with SMTP id n17mr187281wfh.105.1302039992584; Tue, 05 Apr 2011 14:46:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.52.168 with HTTP; Tue, 5 Apr 2011 14:46:10 -0700 (PDT) From: Luis Miguel Silva Date: Tue, 5 Apr 2011 15:46:10 -0600 Message-ID: Subject: Update conflicts? To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Dear all, I'm trying to play around with updates and i'm bumping into some problems. Let's image we have to clients that poll a document from the server at the same time and get the same _rev. Then one of them updates the doc based on the _rev it got: [root@xkitten ~]# curl -X PUT -d '{"_rev":"3-0d519bcf08130bf784f3c35d79760740","hello2":"fred2"}' http://localhost:5984/benchmark/test?conflicts=true {"ok":true,"id":"test","rev":"4-03640ebafbb4fcaf127844671f8e2de7"} Then another one tries to update the doc based on the same exact _rev: [root@xkitten ~]# curl -X PUT -d '{"_rev":"3-0d519bcf08130bf784f3c35d79760740","hello3":"fred3"}' http://localhost:5984/benchmark/test?conflicts=true {"error":"conflict","reason":"Document update conflict."} [root@xkitten ~]# Is there a way to avoid this?! (like...make the update just create a new _rev or something)?? Ideally, we would be able to update without specifying the _rev, just posting (or, in this case PUTting) to the document... Thoughts?? Thank you, Luis