I wanted to see what happens when replace fails due to CAS value, so I executed a fast batch of several dozens of replace requests for the same document, but all with the same CAS value.
The expected result was that only the first would succeed, but instead, all replace operations work.
I then tried to manually tamper with the CAS value (just in case) and indeed when doing that the replace operations still work.
Slowing things down with a debugger also confirms this behavior.
So is the first developer preview supposed to support this?
I see here: https://github.com/couchbase/couchbase-java-client/blob/master/src/main/java/com/couchbase/client/java/CouchbaseBucket.java (line 100) that the CAS value is not even sent, so perhaps this is intentional (for now).