incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhu Han <schumi....@gmail.com>
Subject Re: Randomly read repair?
Date Mon, 20 Sep 2010 01:58:55 GMT
>
> (IMO the "right" thing is more complicated -- we shouldn't send
> requests to _all_ the replicas on the _first_ read with CL.QUORUM,
> except as dictated by randomlyReadRepair.)
>
>
I agree with you. But which replicas to send requests depends on the
replication strategy... Only
the nearest node should receive the requests.

BTW, which version of cassandra was the randomly repair feature firstly
implemented? 0.7 beta?


> On Sat, Sep 18, 2010 at 9:39 AM, Zhu Han <schumi.han@gmail.com> wrote:
> > Hi,
> >
> > I notice below code snippet in StorageProxy#strongRead(). Why the read
> > repair is still trigged randomly if digest  is mis-matched  for CL.Quorum
> > and CL.ALL. IMHO, the client wants the result to be returned is the
> > consistent one on those two CL.  Read repair should be triggered
> > definitively here.
> >
> > If the client does not care about consistency, CL.ONE is the definitive
> > choice. For this level, read repair can be trigged randomly per the
> > configuration of key space.
> >
> >            try
> >>             {
> >>                 long startTime2 = System.currentTimeMillis();
> >>                 row = quorumResponseHandler.get();
> >>                 if (row != null)
> >>                     rows.add(row);
> >>
> >>                 if (logger.isDebugEnabled())
> >>                     logger.debug("quorumResponseHandler: " + (System.
> >> currentTimeMillis() - startTime2) + " ms.");
> >>             }
> >>             catch (DigestMismatchException ex)
> >>             {
> >>                 if (randomlyReadRepair(command))
> >>                 {
> >>                     AbstractReplicationStrategy rs = StorageService.
> >> instance.getReplicationStrategy(command.table);
> >>                     QuorumResponseHandler<Row> qrhRepair = rs.
> >> getQuorumResponseHandler(new ReadResponseResolver(command.table),
> >> ConsistencyLevel.QUORUM);
> >>                     if (logger.isDebugEnabled())
> >>                         logger.debug("Digest mismatch:", ex);
> >>                     Message messageRepair = command.makeReadMessage();
> >>                     MessagingService.instance.sendRR(messageRepair,
> >> commandEndpoints.get(i), qrhRepair);
> >>                     if (repairResponseHandlers == null)
> >>                         repairResponseHandlers = new ArrayList<
> >> QuorumResponseHandler<Row>>();
> >>                     repairResponseHandlers.add(qrhRepair);
> >>                 }
> >>
> >
> >
> >
> >
> > best regards,
> > hanzhu
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message