incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aju <...@muly.dk>
Subject Re: put and no _rev
Date Fri, 06 Mar 2009 20:09:43 GMT
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
> 


Mime
View raw message