Work with replication conflicts in BigCouch

The wiki couchDB Replication and Conflicts page suggests using _bulk_docs with all_or_nothing=true to force the writing of new versions of documents, even if this introduces write conflicts, but then resolve immediately after subsequent readings. I implemented this and it seems to be working fine.

But BigCouch does not support the semantics of all_or_nothing , so records in voluminous documents can return 409 conflict results. What is the best practice for implementing similar conflict resolution at the application level for conflicts that arise during replication in BigCouch? Should I look for resolution of recording time conflicts?

+47
couchdb bigcouch
Jul 01 2018-12-12T00:
source share
1 answer

Get the version number of the document that will be updated if there is a conflict in the attachment and recursively call in case of a conflict,

 $url = "http://couchdb/DATABASE/DOCID/ATTACHMENTNAME?rev=$rev"; curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_PUT, true ); curl_setopt( $ch, CURLOPT_URL, $url ); curl_exec( $ch ); 
+1
Jun 07 '13 at 12:13
source share



All Articles