From user-return-3886-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Mar 06 20:10:17 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 58513 invoked from network); 6 Mar 2009 20:10:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 20:10:17 -0000 Received: (qmail 19010 invoked by uid 500); 6 Mar 2009 20:10:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 18962 invoked by uid 500); 6 Mar 2009 20:10:14 -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 18951 invoked by uid 99); 6 Mar 2009 20:10:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 12:10:14 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [84.238.112.40] (HELO cuda.parknet.dk) (84.238.112.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 20:10:08 +0000 X-ASG-Debug-ID: 1236370184-26e900330000-z14J5S X-Barracuda-URL: http://cuda.parknet.dk:80/cgi-bin/mark.cgi Received: from Allan-Juuls-Computer.local (localhost [127.0.0.1]) by cuda.parknet.dk (Spam Firewall) with ESMTP id 7F7221CA3CD3 for ; Fri, 6 Mar 2009 21:09:44 +0100 (CET) Received: from Allan-Juuls-Computer.local ([10.90.205.229]) by cuda.parknet.dk with ESMTP id 6QghgH6Nq3tFNRU1 for ; Fri, 06 Mar 2009 21:09:44 +0100 (CET) Message-ID: <49B18307.7020504@muly.dk> Date: Fri, 06 Mar 2009 21:09:43 +0100 From: aju User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: user@couchdb.apache.org X-ASG-Orig-Subj: Re: put and no _rev Subject: Re: put and no _rev References: <49B1543D.5060404@muly.dk> <64a10fff0903060854h62112eabu7c7f9f2784400d04@mail.gmail.com> <49B17241.4090209@muly.dk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Barracuda-Connect: UNKNOWN[10.90.205.229] X-Barracuda-Start-Time: 1236370184 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at parknet.dk X-Virus-Checked: Checked by ClamAV on apache.org thanks all i guess my confusion stemmed from the fact that i hadn't read this fundamental sentence from the docs "You cannot rely on document revisions for any other purpose than concurrency control." ./allan Paul Davis wrote: > Its a single step for the *user* in both cases. Both RDBMS's and > Subversion are doing *alot* of behind the scenes voodoo to make sure > that you're not overwriting a single doc simultaneous for consistency > and transactional semantics. The issue is that when you try and make > this magic span physical hosts it gets really hard. > >> consider from the wiki docs: >> >> GET /somedatabase/some_doc_id HTTP/1.0 >> >> "The above example gets the current revision" >> >> >> >> then why would >> >> >> PUT /somedatabase/some_doc_id HTTP/1.0 >> >> >> not also work on the current revision ? >> >> >> ./allan >> > > And Jan just wrote my example. > > Also for reference, the corresponding SQL is generally like such: > > UPDATE ... WHERE docid = ? AND revision_identifier = ? ; > if num_affected_rows != 1: > raise ConflictError() > > HTH, > Paul Davis >