I am trying to handle some couchbase exceptions in my application. The upsert method can throw a TemporaryFailureException indicating temporary failures on server end. Can there be a case where the CAS value of the document would have been updated? In case this exception occurs, I am retrying for a fixed number of times with exponential backOff. If the CAS value was updated, then while retrying next time I need to make sure next time that I pass the updated CAS value otherwise i will get a CASMismatchException.
So is there a guarantee that CAS value will not have been updated in case of failures on server end?