Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for 
change notification.

The "API" page has been changed by DavidJeske.
http://wiki.apache.org/cassandra/API?action=diff&rev1=69&rev2=70

--------------------------------------------------

  
  == Structures ==
  === ConsistencyLevel ===
- The `ConsistencyLevel` is an `enum` that controls both read and write 
behavior based on `<ReplicationFactor>` in your `storage-conf.xml`. The 
different consistency levels have different meanings, depending on if you're 
doing a write or read operation.  Note that if `W` + `R` > `ReplicationFactor`, 
where W is the number of nodes to block for on write, and R the number to block 
for on reads, you will have strongly consistent behavior; that is, readers will 
always see the most recent write.  Of these, the most interesting is to do 
`QUORUM` reads and writes, which gives you consistency while still allowing 
availability in the face of node failures up to half of `ReplicationFactor`.  
Of course if latency is more important than consistency then you can use lower 
values for either or both.
+ The `ConsistencyLevel` is an `enum` that controls both read and write 
behavior based on `<ReplicationFactor>` in your `storage-conf.xml`. The 
different consistency levels have different meanings, depending on if you're 
doing a write or read operation.  Note that if `W` + `R` > `ReplicationFactor`, 
where W is the number of nodes to block for on write, and R the number to block 
for on reads, you will have the most consistent behavior (* see below). Of 
these, the most interesting is to do `QUORUM` reads and writes, which gives you 
consistency while still allowing availability in the face of node failures up 
to half of `ReplicationFactor`.  Of course if latency is more important than 
consistency then you can use lower values for either or both.
+ 
+ * Because the repair replication process only requires a write to reach a 
single node to propagate, a write which 'fails' to meet consistency 
requirements will still appear eventually so long at it was written to at least 
one node. With W and R both using QUORUM, the best consistency we can achieve 
is the guarantee that we will receive the same value regardless of which nodes 
we read from. However, we can still peform a W=QUORUM that "fails" but reaches 
one server, perform a R=QUORUM that reads the old value, and then sometime 
later perform a R=QUORUM that reads the new value. 
  
  Terminology: "N" is the ReplicationFactor; "replicas" are the `N` nodes that 
are directly responsible for the data; "nodes" are any/all nodes in the 
cluster, including HintedHandoff participants.
  

Reply via email to