Reputation: 48712
The documentation for Cassandra consistency levels says about the EACH_QUORUM
consistency level:
A write must be written to the commit log and memtable on a quorum of replica nodes in all data centers. Used in multiple data center clusters...
What are the semantics of the EACH_QUORUM
consistency level when there is only one data centre? I can think of two possibilities:
EACH_QUORUM
requires writes to be written on a quorum of nodes in the sole data centre.QUORUM
instead.Upvotes: 1
Views: 260
Reputation: 48712
After some experimentation, using Cassandra 2.1.5 and the Datastax Java driver 2.1.5, I discovered that the implemented (if not the intended semantics) are that the EACH_QUORUM
consistency level works only when you have more than one data-centre. The Java driver fails EACH_QUORUM
writes when there is only one data-centre, throwing an UnavailableException
that complains that 0 nodes are available. Writes using QUORUM
work OK.
Therefore do not use EACH_QUORUM
consistency-level if you have only one data-centre. Use QUORUM
instead.
Upvotes: 2