High volume updates to a single key in a distributed system that relies on
a timestamp for conflict resolution is not a particularly great idea.  If
you ever do this from multiple clients you'll find unexpected results at
least some of the time.

On Tue, Dec 15, 2015 at 12:41 PM Paulo Motta <pauloricard...@gmail.com>
wrote:

> > We are using 2.1.7.1
>
> Then you should be able to use the java driver timestamp generators.
>
> > So, we need to look for clock sync issues between nodes in our ring?
> How close do they need to be?
>
> millisecond precision since that is the server precision for timestamps,
> so probably NTP should do the job. if your application have submillisecond
> updates in the same partitions, you'd probably need to use client-side
> timestamps anyway, since they allow setting timestamps with sub-ms
> precision.
>
> > Very cool!  If we have multiple nodes in our application, I suppose
> *their* clocks will have to be sync'ed for this to work, right?
>
> correct, you may also use ntp to synchronize clocks between clients.
>
>
> 2015-12-15 12:19 GMT-08:00 James Carman <ja...@carmanconsulting.com>:
>
>>
>>
>> On Tue, Dec 15, 2015 at 2:57 PM Paulo Motta <pauloricard...@gmail.com>
>> wrote:
>>
>>> What cassandra and driver versions are you running?
>>>
>>>
>> We are using 2.1.7.1
>>
>>
>>> It may be that the second update is getting the same timestamp as the
>>> first, or even a lower timestamp if it's being processed by another server
>>> with unsynced clock, so that update may be getting lost.
>>>
>>>
>> So, we need to look for clock sync issues between nodes in our ring?  How
>> close do they need to be?
>>
>>
>>> If you have high frequency updates in the same partition from the same
>>> client you should probably use client-side timestamps with a configured
>>> timestamp generator on the driver, available in Cassandra 2.1 and Java
>>> driver 2.1.2, and default in java driver 3.0.
>>>
>>>
>> Very cool!  If we have multiple nodes in our application, I suppose
>> *their* clocks will have to be sync'ed for this to work, right?
>>
>
>

Reply via email to