CAS (atomic compare-and-swap) support (https://issues.apache.org/jira/browse/CASSANDRA-5062) is now finished in Cassandra for 2.0, along with the earlier corresponding CQL support (https://issues.apache.org/jira/browse/CASSANDRA-5443). Specifically this support was implemented in the context of high latency, much like C* in general.
In their implementation, they chose to do a Paxos implementation; Zookeeper is not used at all.
CAS is a basic building block, much like the ZNode ops in ZK. In particular, here's a first attempt at a recipe to do leader election:
- Potential leaders each generate a UUID
- Attempt to store the UUID; if the following returns true, this means it's the leader: