I have a question about the ‘replace’ method with ‘cas’.
Is there any option to success all or fail all if one of cas is invalid when update multiple documents?
Due to the distributed nature of Couchbase Server, performing atomic updates across multiple keys is not directly possible. It is however possible to use CAS to perform your updates one at a time, and then when you receive an error you can attempt to ‘roll back’ previous updated, however this is slow and prone to errors should you’re rollback attempt fail for any reason.
The reason that I do not provide support for this by default within the library is that the failure handling for each individual operation that may fail (include rollback attempts) is not something that can be predetermined and would be application specific.