cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shankarpnsn <shankarp...@gmail.com>
Subject Re: What does ReadRepair exactly do?
Date Thu, 25 Oct 2012 18:15:24 GMT
manuzhang wrote
> read quorum doesn't mean we read newest values from a quorum number of
> replicas but to ensure we read at least one newest value as long as write
> quorum succeeded beforehand and W+R > N.

I beg to differ here. Any read/write, by definition of quorum, should have
at least n/2 + 1 replicas that agree on that read/write value. Responding to
the user with a newer value, even if the write creating the new value hasn't
completed cannot guarantee any read consistency > 1. 


Hiller, Dean wrote
>> Kind of an interesting question
>>
>> I think you are saying if a client read resolved only the two nodes as
>> said in Aaron's email back to the client and read -repair was kicked off
>> because of the inconsistent values and the write did not complete yet and
>> I guess you would have two nodes go down to lose the value right after
>> the
>> read, and before write was finished such that the client read a value
>> that
>> was never stored in the database.  The odds of two nodes going out are
>> pretty slim though.
>> Thanks,
>> Dean

Bingo! I do understand that the odds of a quorum nodes going down are low
and that any subsequent read would achieve a quorum. However, I'm wondering
what would be the right thing to do here, given that the client has
particularly asked for a certain consistency on the read and cassandra
returns a value that doesn't have the consistency. The heart of the problem
here is that the coordinator responds to a client request "assuming" that
the consistency has been achieved the moment is issues a row repair with the
super-set of the resolved value; without receiving acknowledgement on the
success of a repair from the replicas for a given consistency constraint. 

In order to adhere to the given consistency specification, the row repair
(due to consistent reads) should repeat the read after issuing a
"consistency repair" to ensure if the consistency is met. Like Manu
mentioned, this could of course lead to a number of repeat reads if the
writes arrive quickly - until the read gets timed out. However, note that we
would still be honoring the consistency constraint for that read. 



--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/What-does-ReadRepair-exactly-do-tp7583261p7583400.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Mime
View raw message