Haris Farooqui
Haris Farooqui

Reputation: 994

Not enough replica available for query at consistency SERIAL (2 required but only 1 alive)

Experts,

I have the following configuration 3 nodes cluster (Cassandra 2.1):

 - Replication factor of 2
 - Consistency level ONE
 - Driver consistency level SERIAL
 - SimpleStrategy
 - GossipingPropertyFileSnitch

With this configuration, if I bring down one node I get the following error:

Not enough replica available for query at consistency SERIAL (2 required but only 1 alive)

Data is distributed evenly across all the nodes and nodetool status correctly shows that one node is down on the running 2 cassandra nodes

With CONSISTENCY ONE and 2 nodes ups, why does it require both the replica nodes to be up???

Also I read that with SERIAL drive consistency wrt WRITE failures: If one of three nodes is down, the Paxos commit fails under the following conditions:

This works if I set the replication factor to 3. But I don't think there should be a need to do so.

Am I missing something here?

Upvotes: 2

Views: 1873

Answers (1)

JayK
JayK

Reputation: 815

You have hit one of the hidden gems of the Paxos protocol in Cassandra. Under the hood, Paxos works in a way that it uses a QUORUM-like consistency level for its calls.

Note that it complains about SERIAL consistency level in your error message instead of the consistency level ONE that you have set. LWT ignores what normal consistency level is set in most cases. It follows either SERIAL or LOCAL_SERIAL consistency level, which maps almost directly to a QUORUM or a LOCAL_QUORUM of nodes.

The quorum of two nodes is: two. Therefore you are getting this error message when one node is down.

Upvotes: 4

Related Questions