DEV Community

Discussion on: Database 101: How social media “likes” are stored in a database

Collapse
 
nevodavid profile image
Nevo David

I am trying to understand the benefits of being atomic.

If multiple users run the update query, they will probably get a deadlock back.

Collapse
 
tzach profile image
Tzach Livyatan ScyllaDB

Deadlock is impossible.
Counters implementation is base on CRDT, which is explained here:
scylladb.com/2017/04/04/counters/