Re: Not enough replica available” when consistency is ONE?

2015-01-19 Thread Sylvain Lebresne
On Mon, Jan 19, 2015 at 2:29 AM, Kevin Burton bur...@spinn3r.com wrote: So ConsistencyLevel.ONE and if not exists are essentially mutually incompatible and shouldn’t the driver throw an exception if the user requests this configuration? The subtlety is that this consistency level (CL.ONE in

Re: Not enough replica available” when consistency is ONE?

2015-01-19 Thread Panagiotis Garefalakis
Hello, My feeling is you got the hole CAS operations concept wrong. CAS operations a.k.a lightweight transactions are not meant to used everywhere, only in specific parts of your application where serialisable consistency is necessary. For any other case there is a variety of consistency levels

Re: Not enough replica available” when consistency is ONE?

2015-01-18 Thread Kevin Burton
OK.. so if I’m running with 2 replicas, then BOTH of them need to be online for this to work. Correct? Because with two replicas I need 2 to form a quorum. This is somewhat confusing them. Because if you have two replicas, and you’re depending on these types of transactions, then this is a

Not enough replica available” when consistency is ONE?

2015-01-18 Thread Kevin Burton
I’m really confused here. I”m calling: acquireInsert.setConsistencyLevel( ConsistencyLevel.ONE ); but I”m still getting the exception: com.datastax.driver.core.exceptions.UnavailableException: Not enough replica available for query at consistency SERIAL (2 required but only 1 alive)

Re: Not enough replica available” when consistency is ONE?

2015-01-18 Thread Eric Stevens
Check out http://www.datastax.com/documentation/cassandra/2.0/cassandra/dml/dml_tunable_consistency_c.html Cassandra 2.0 uses the Paxos consensus protocol, which resembles 2-phase commit, to support linearizable consistency. All operations are quorum-based ... This kicks in whenever you do CAS