with_atomic_for_cas for put delete
MohsenNz opened this issue · 1 comments
MohsenNz commented
Why it is with_atomic_for_cas while we can use it for put and delete.
In the other word, dose it valid to use it for put/delete?
if yes, what dose means? because I thought all put and delete occur atomically on quorum of nodes.
ekexium commented
If you need CAS opertions, you need to set with_atomic_for_cas
. It's explained in the doc of with_atomic_for_cas
The implementation detail is that CAS in TiKV actually uses some mechanism of the transactional API and has higher cost. Normal put/delete operations don't handle that.