cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r998720 - /cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java
Date Sun, 19 Sep 2010 19:40:31 GMT
Author: jbellis
Date: Sun Sep 19 19:40:31 2010
New Revision: 998720

URL: http://svn.apache.org/viewvc?rev=998720&view=rev
Log:
always repair on digest mismatch for CL > 1.  patch by jbellis

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java?rev=998720&r1=998719&r2=998720&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java Sun Sep 19 19:40:31
2010
@@ -362,18 +362,15 @@ public class StorageProxy implements Sto
             }
             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);
-                }
+                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);
             }
         }
 



Mime
View raw message