couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: Where to add documentation for bulk updates
Date Sun, 22 Mar 2009 22:02:37 GMT
On Sun, Mar 22, 2009 at 07:37:01AM -0700, David Van Couvering wrote:
> OK, I updated the page.  Can someone please make sure my example response is
> correct?  I gleaned it best as I could from the existing docs.  In
> particular, is the format of the request for all-or-nothing correct, and is
> the conflict response correct?

http://wiki.apache.org/couchdb/HTTP_Document_API

Meta edit conflict warning: the wiki page itself shows a wiki edit conflict
at the moment :-)

Aside: if I read this correctly, it seems you can now get completely
different semantics for updating a single document, if instead of using PUT,
you POST it to _bulk_docs?all_or_nothing=true. In the latter case, if
someone else has change the doc in the mean time, you'll get both versions
saved.

In some ways you can now argue that PUT has the unusual semantics of
rejecting a document update if the _rev is wrong. PUT gives a sort of single
node "transaction" which ensures your document remains conflict-free, but
only so long as you don't include replication into the mix. Wasn't this also
the case for the old _bulk_docs transactions?

Regards,

Brian.

Mime
View raw message