Kassandra - client timestamp and conflict recognition

Cassandra’s latest record policy is based on a timestamp, and this is the client’s timestamp. It is possible that the time between clients is not synchronized - this can lead to loss of updates. I would like to know exactly what is happening in current scenarios:

  • Client hours are delayed for several years - in this case, a message about sending a column from this low-key client always has an old time stamp compared to an existing value (created by a "regular" client). Will Cassandra ignore such an update? Will this update overwrite the existing column value and set an older time?
  • The client receives several years - in this case, the update from this client will always win, in the case of a simultaneous request for recording made from another "correct" client - right?
+4
source share
2 answers

Yes, timestamps are used to resolve conflicts, so new timestamps always win. The general recommendation is to run ntp on all of your machines.

If for some reason ntp is not an option, you can set the timestamp of what you ever need on the client, but you will have to develop your own way of synchronizing this value (getting ntp-work will almost always be easier).

+3
source

I wrote a post about Cassandra Timestamps a while ago. It discusses conflict situations.

+1
source

Source: https://habr.com/ru/post/1398237/


All Articles