I have question about cas number help me pls


#1

i have some question about couchbase.

the first one is

If i inserting data by couchbase, will cas (compare and swap) be included too?

and then

If so, where does cas come from? The documentation states that it is in metadata. However, it is not clear how the method is brought.

Does couchbase take the previous cas value first and then assign the cas value?
I’m curious about them.
I am grateful to inform.


#2

If i inserting data by couchbase, will cas (compare and swap) be included too?

Yes

Does couchbase take the previous cas value first and then assign the cas value?

No , every time you mutate document , the new CAS value is assigned


#3

Generally speaking, the CAS should be opaque to your application. It’s just a unique identifier for a given state of that document in a set of revisions.