couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: Where to add documentation for bulk updates
Date Mon, 23 Mar 2009 21:29:39 GMT
On Mon, Mar 23, 2009 at 12:25:02PM -0700, David Van Couvering wrote:
>    Fixed.  Thanks for catching this.  Obviously I should have tested this,
>    but I am very busy right now, and I wanted to get this doc out in time
>    for the release.

Hmm, I believe the wiki is still wrong, I'm afraid.

As I understand it:

* In the normal (non-atomic) mode, the _rev of each document is checked, and
individual documents may either be updated, or rejected with "error:"
"conflict", "reason": "Document update conflict." in the case that the
supplied _rev doesn't match the current _rev.

* If you post with {"all_or_nothing":true} then you will *never* see a
conflict error in the response. All documents will show successful saves.
But in those cases where the _rev posted does not match the current _rev,
both versions of the document will reside in the database, and be marked as
in conflict.

So as far as I can tell, the "all or nothing" part of this only comes into
play if the server is killed during the POST. When it is restarted, you'll
either see all the updates, or none. (I'm not sure if this guarantee is
covered through replication too, that is, if either server is killed while a
replication is taking place)



View raw message