rnewson commented on issue #1235: Idea: Bring back all_or_nothing
URL: https://github.com/apache/couchdb/issues/1235#issuecomment-376321749
 
 
   Perhaps we're talking past each other.
   
   CouchDB's original all_or_nothing semantic was that all the updates would be 
applied to the database or none would be. This was possible because there was a 
single file and an atomic operation to update the b+trees.
   
   When we added clustering, this semantic could no longer be honored without a 
consistency protocol / distributed transaction.
   
   The current all_or_nothing behaviour is that the changes will be written 
even if they introduce conflicts. Not an obvious semantic.
   
   Your point about validate_doc_update functions is separate, the 
all_or_nothing behaviour worked whether there were VDU's or not. Perhaps 
there's a case for not processing a _bulk_docs request if any item fails the 
validation but it runs against our explicit choice of availability (for reads 
_and_ for writes) over consistency, and the long-held position that the unit of 
consistency is the individual document. It's also not guaranteed to be the case 
that all the writes would succeed if the validate_doc_update functions pass for 
every document in the _bulk_docs request.
   
   In your original comment;
   
   ```
   If the validation fails for the updated document, conflicts are deleted, but 
main document is not updated. If the sender is unable to solve such situation 
immediately, the data from the conflicted documents are lost.
   ```
   
   I don't recognise that behavior for CouchDB. CouchDB does not discard 
successful writes after the fact, so if you want to expand on what you observed 
there perhaps there's something to learn.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to