Following case may be logical correct for Cassandra, but difficult for user.
Let's say:

Cassandra consistency level: write all, read one
replication_factor:3

For one record, rowkey:001, column:status

Client 1, insert value for rowkey 001, status:True, timestamp 11:00:05
Client 2 Slice Query, get the value True for rowkey 001, @11:00:00
Client 2, update value for rowkey 001, status:False, timestamp 11:00:02

So the client update sequence is True to False, although the update
requests are from different nodes, but the sequence are logically ordered.

But the result is rowkey:001, column:status, value: True

So why Cassandra so depend on client local time? Why not using server
localtime instead client local time?

Because I am using consistency level write all, and replication_factor:3,
so for all the 3 nodes, the update sequence is correct (True -> False),
they can give a correct final results.

If for some reason, it need strong depends on operation's timestamp, then
query operation also need a timestamp, then Client 2 will not see the value
True, which happen in "future".

So either using server timestamp or provide a consistent view by using
timestamp for query, it will be more consistent.

Otherwise, the consistency of Cassandra is so weak.

Reply via email to