Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The consistency level can be varied for each write (and read). </p> <p>For example, let's say we have 10 nodes, with a replication factor of 3. </p> <p>But if we write with a consistency level of ANY, none of the eventual 3 replicas may initally have the data when the write call returns. If we use consistency level ONE, then only one of the eventual 3 replicas has to have the data before the write returns, so a read straight after the write may see outdated data <em>if</em> the read has a low consistency level.</p> <p>See <a href="http://wiki.apache.org/cassandra/API" rel="nofollow">http://wiki.apache.org/cassandra/API</a> for the definitions of the consistency levels, particularly the following:</p> <blockquote> <p>Read level ONE: Will return the record returned by the first replica to respond. A consistency check is always done in a background thread to fix any consistency issues when ConsistencyLevel.ONE is used. This means subsequent calls will have correct data even if the initial read gets an older value. (This is called ReadRepair)</p> </blockquote> <p>See also <a href="http://wiki.apache.org/cassandra/ReadRepair" rel="nofollow">http://wiki.apache.org/cassandra/ReadRepair</a> :</p> <blockquote> <p>Read repair means that when a query is made against a given key, we perform a digest query against all the replicas of the key and push the most recent version to any out-of-date replicas. If a low ConsistencyLevel was specified, this is done in the background after returning the data from the closest replica to the client; otherwise, it is done before returning the data.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload