Open KMax opened 5 years ago
INSERT ... IF NOT EXISTS
employs the lightweight transactions mechanism which isn't supported by ScyllaDB yet (see https://github.com/scylladb/scylla/issues/1359). And lightweight transactions introduce a significant overhead which may be undesirable.
The
card(c)
,card(p)
andcard(p, o)
may be below zero, which is wrong. Maybe fixed by using the conditional UPDATE which would check if the counter is not less than the decrement.