You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Anthony Wilcox <pe...@hotmail.com> on 2011/10/07 15:21:04 UTC

Immutable CFs and read consistency

We have a Column Family that is immutable (no updates after the first write).  Suppose we use RF=2 and W=1.  Do we still need R=2, so that R+W>RF?  Or is it sufficient to have R=1?  My guess is yes, R=1 is sufficient since if it reads a row, the row has to be correct: it can't get stale data.     But can it get NO data? That is, with R=1 might cassandra look on one of the two nodes, find no data there, and prematurely give up?  In other words, does R apply only to (possibly failed) read attempts or only to successful reads?

 Thanks, Anthony
 		 	   		  

RE: Immutable CFs and read consistency

Posted by Dan Hendry <da...@gmail.com>.
The R+W > RF requirement for strong consistency applies regardless of
whether your data is 'immutable' or is being updated. A W=1, R=1 approach
will not guarantee consistency between reads and writes. 

 

> R=1 might cassandra look on one of the two nodes, find no data there, and
prematurely give up?

 

In essence yes, but Cassandra is not 'prematurely giving up', its doing
exactly what you as the client are telling it to do: return once *one* node
has been checked for the data you are requesting.

 

> does R apply only to (possibly failed) read attempts or only to successful
reads

 

Not quite sure what you are asking but the R+W > RF requirement for strong
consistency only applies to successful reads and writes. You will get
UnavailableExceptions client side (for reads and writes) if the requested
consistency level could not be met.

 

Dan

 

From: Anthony Wilcox [mailto:peacepatriot@hotmail.com] 
Sent: October-07-11 9:33
To: user@cassandra.apache.org
Subject: RE: Immutable CFs and read consistency

 

The last sentence should have been "In other words, does R apply also to
(possibly failed) read attempts or only to successful reads?"

 Anthony

  _____  

From: peacepatriot@hotmail.com
To: user@cassandra.apache.org
Subject: Immutable CFs and read consistency
Date: Fri, 7 Oct 2011 06:21:04 -0700

We have a Column Family that is immutable (no updates after the first
write).  Suppose we use RF=2 and W=1.  Do we still need R=2, so that R+W>RF?
Or is it sufficient to have R=1?  My guess is yes, R=1 is sufficient since
if it reads a row, the row has to be correct: it can't get stale data.
But can it get NO data? That is, with R=1 might cassandra look on one of the
two nodes, find no data there, and prematurely give up?  In other words,
does R apply only to (possibly failed) read attempts or only to successful
reads?

 Thanks, Anthony

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.914 / Virus Database: 271.1.1/3942 - Release Date: 10/06/11
14:34:00


RE: Immutable CFs and read consistency

Posted by Anthony Wilcox <pe...@hotmail.com>.
The last sentence should have been "In other words, does R apply also to (possibly failed) read attempts or only to successful reads?"

 Anthony

From: peacepatriot@hotmail.com
To: user@cassandra.apache.org
Subject: Immutable CFs and read consistency
Date: Fri, 7 Oct 2011 06:21:04 -0700








We have a Column Family that is immutable (no updates after the first write).  Suppose we use RF=2 and W=1.  Do we still need R=2, so that R+W>RF?  Or is it sufficient to have R=1?  My guess is yes, R=1 is sufficient since if it reads a row, the row has to be correct: it can't get stale data.     But can it get NO data? That is, with R=1 might cassandra look on one of the two nodes, find no data there, and prematurely give up?  In other words, does R apply only to (possibly failed) read attempts or only to successful reads?

 Thanks, Anthony