The question is that, When we use
INSERT INTO USERS (login, email, name, login_count)
values ('jbellis', '[email protected]', 'Jonathan Ellis', 1)
IF NOT EXISTS
in IF NOT EXIST exactly which columns are compared together? primary key(partition-key + clustering-key)? or just partition-key?
Here is a diagram of the 4 phases of LWT: http://www.slideshare.net/doanduyhai/cassandra-introduction-nantesjug/89
The original blog post is here: http://www.datastax.com/dev/blog/lightweight-transactions-in-cassandra-2-0
The whole primary key is checked on disk. In the example it is a simple primary key so it's also the partition key, e.g. login column