0

How can you make sure that one user insert is not influenced by another user?

Like transactions...

Do you use a batch job in combination with IF NOT EXISTS?

BEGIN UNLOGGED BATCH
INSERT INTO atable ("user1") value (10)
INSERT INTO atable ("user2") value (-10)
APPLY BATCH
Chris G.
  • 23,930
  • 48
  • 177
  • 302

1 Answers1

0

Cassandra introduced 'light weight' transaction in 2.0, but it is not fully respect to ACID properties.

It uses Paxos to guarantee atomicity for such kind of 'light weight' transactions but it lacks the isolations solutions for handling concurrent transactions.

A solution could be implement two phase locking or some kind of optimistic concurrency control on top of Cassandra by yourself.

Qinjin
  • 401
  • 4
  • 12