cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Bromhead <>
Subject Re: Handle Leap Seconds with Cassandra
Date Thu, 20 Oct 2016 17:55:04 GMT gives a
pretty good overview

If you are using a timestamp as part of your primary key, this is the
situation where you could end up overwriting data. I would suggest using
timeuuid instead which will ensure that you get different primary keys even
for data inserted at the exact same timestamp.

The blog post also suggests using certain monotonic timestamp classes in
Java however these will not help you if you have multiple clients that may
overwrite data.

As for the interleaving or out of order problem, this is hard to address in
Cassandra without resorting to external coordination or LWTs. If you are
relying on a wall clock to guarantee order in a distributed system you will
get yourself into trouble even without leap seconds (clock drift, NTP
inaccuracy etc).

On Thu, 20 Oct 2016 at 10:30 Anuj Wadehra <> wrote:

> Hi,
> I would like to know how you guys handle leap seconds with Cassandra.
> I am not bothered about the livelock issue as we are using appropriate
> versions of Linux and Java. I am more interested in finding an optimum
> answer for the following question:
> How do you handle wrong ordering of multiple writes (on same row and
> column) during the leap second? You may overwrite the new value with old
> one (disaster).
> And Downtime is no option :)
> I can see that CASSANDRA-9131 is still open..
> FYI..we are on 2.0.14 ..
> Thanks
> Anuj
Ben Bromhead
CTO | Instaclustr <>
+1 650 284 9692
Managed Cassandra / Spark on AWS, Azure and Softlayer

View raw message