cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin>
Subject Re: "timestamp" parameter for Thrift "insert" API ??
Date Wed, 22 Sep 2010 05:09:50 GMT
On Mon, Sep 20, 2010 at 7:25 PM, Kuan(謝冠生) <> wrote:
> By using cassandra-cli tool, we don't have to input timestamp while insertion. Does it
mean that Cassandra have time synchronization build-in already?

No, it means the cassandra-cli program is inserting a timestamp, which
it then provides to the cluster via thrift, just like any other

> Since cassandra depending on time-stamp parameter very much (both read/write). The most
ideal way to deal with timestamp is by cassandra itself, considering data safty and consistensy....

This doesn't fix anything, unfortunately.  Time synchronization/event
ordering in distributed systems is a notoriously hard problem.  Having
Cassandra nodes (remember, there are many in a cluster) assign
timestamps just means their clocks need to be tightly synchronized,
exactly as is the case for having clients insert timestamps.  They
will never be in sync enough to deal with badly designed apps
attempting to simultaneously write to the same cell.

Further, as jbellis mentioned, there are other reasons to not want the
_current_ time used as the timestamp.  The end result is that it is
neither advantageous nor desirable to have cluster nodes assign
timestamps.  If that is the requirement, you need to a) fix your
application, b) use a locking service like Zookeeper, or c) use an
ACID database.


View raw message