CAS Value Of Couchbase Documents

Hi Team,

While going through CB docs related to conflict resolution on timestamp based, we got to know that documents timestamp stored in CAS but there is no clear documentation mention related CAS. Could you please help me more detail about CAS and how we can read/measurement the same value.

Thanks,
Debasis

The CAS is an opaque type. You should not be trying to rely on the content. This is detailed, for example, here:

https://docs.couchbase.com/c-sdk/current/howtos/concurrent-document-mutations.html#cas-value-format

HTH.

thanks @dh but how CB relying on this CAS while there is a conflict occur during XDCR replication if the bucket conflict resolution type is timestamp based.

Thanks,
Debasis

there is no clear documentation mention related CAS

It’s pretty clear.

how we can read/measurement the same value

You can read it all you like. For every operation that requires the cas, it will have been previously read. I don’t know what you mean by “measurement”. It’s opaque. It’s value is meaningless to applications.

https://docs.couchbase.com/java-sdk/current/howtos/concurrent-document-mutations.html#cas-value-format

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.