Enum ConsistencyLevel
Consistency refers to how up-to-date and synchronized a row of Cassandra data is on all of its replicas. When selecting, the consistency level specifies how many replicas must respond to a read request before returning data to the client application. When updating, inserting or deleting the consistency level specifies the number of replicas on which the write must succeed before returning an acknowledgment to the client application.
Namespace: Dse
Assembly: Dse.dll
Syntax
public enum ConsistencyLevel
Fields
Name | Description |
---|---|
All | Reading: Returns the record with the most recent timestamp after all replicas have responded. The read operation will fail if a replica does not respond. Writing: A write must be written to the commit log and memory table on all replica nodes in the cluster for that row. |
Any | Writing: A write must be written to at least one node. If all replica nodes for the given row key are down, the write can still succeed after a hinted handoff has been written. If all replica nodes are down at write time, an ANY write is not readable until the replica nodes for that row have recovered. |
EachQuorum | Reading: Returns the record once a quorum of replicas in each data center of the cluster has responded. Writing: Strong consistency. A write must be written to the commit log and memtable on a quorum of replica nodes in all data centers. |
LocalOne | Similar to |
LocalQuorum | Reading: Returns the record with the most recent timestamp once a quorum of replicas in the current data center as the coordinator node has reported. Writing: A write must be written to the commit log and memory table on a quorum of replica nodes in the same data center as the coordinator node. Avoids latency of inter-data center communication. |
LocalSerial | Same as |
One | Returns a response from the closest replica, as determined by the snitch. |
Quorum | Reading: Returns the record with the most recent timestamp after a quorum of replicas has responded regardless of data center. Writing: A write must be written to the commit log and memory table on a quorum of replica nodes. |
Serial | Allows reading the current (and possibly uncommitted) state of data without proposing a new addition or update. If a SERIAL read finds an uncommitted transaction in progress, it will commit the transaction as part of the read. |
Three | Returns the most recent data from three of the closest replicas. |
Two | Returns the most recent data from two of the closest replicas. |