cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [2/3] cassandra git commit: Log failed host when preparing incremental repair
Date Tue, 25 Nov 2014 00:49:28 GMT
Log failed host when preparing incremental repair

patch by Rajanarayanan Thottuvaikkatumana; reviewed by yukim for CASSANDRA-8228


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/29436845
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/29436845
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/29436845

Branch: refs/heads/trunk
Commit: 29436845f8dfe0ab6d26ca1cd11ad22e2861bb1a
Parents: 326a9ff
Author: Rajanarayanan Thottuvaikkatumana <rnamboodiri@gmail.com>
Authored: Mon Nov 24 18:48:44 2014 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Mon Nov 24 18:48:44 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 src/java/org/apache/cassandra/service/ActiveRepairService.java | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/29436845/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index fa3ce8a..f022b19 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@
  * Have paxos reuse the timestamp generation of normal queries (CASSANDRA-7801)
  * Fix incremental repair not remove parent session on remote (CASSANDRA-8291)
  * Improve JBOD disk utilization (CASSANDRA-7386)
+ * Log failed host when preparing incremental repair (CASSANDRA-8228)
 Merged from 2.0:
  * Ignore Paxos commits for truncated tables (CASSANDRA-7538)
  * Validate size of indexed column values (CASSANDRA-8280)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/29436845/src/java/org/apache/cassandra/service/ActiveRepairService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/ActiveRepairService.java b/src/java/org/apache/cassandra/service/ActiveRepairService.java
index d43143e..17cf6ef 100644
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@ -247,6 +247,7 @@ public class ActiveRepairService
         registerParentRepairSession(parentRepairSession, columnFamilyStores, ranges);
         final CountDownLatch prepareLatch = new CountDownLatch(endpoints.size());
         final AtomicBoolean status = new AtomicBoolean(true);
+        final Set<String> failedNodes = Collections.synchronizedSet(new HashSet<String>());
         IAsyncCallbackWithFailure callback = new IAsyncCallbackWithFailure()
         {
             public void response(MessageIn msg)
@@ -262,6 +263,7 @@ public class ActiveRepairService
             public void onFailure(InetAddress from)
             {
                 status.set(false);
+                failedNodes.add(from.getHostAddress());
                 prepareLatch.countDown();
             }
         };
@@ -283,13 +285,13 @@ public class ActiveRepairService
         catch (InterruptedException e)
         {
             parentRepairSessions.remove(parentRepairSession);
-            throw new RuntimeException("Did not get replies from all endpoints.", e);
+            throw new RuntimeException("Did not get replies from all endpoints. List of failed
endpoint(s): " + failedNodes.toString(), e);
         }
 
         if (!status.get())
         {
             parentRepairSessions.remove(parentRepairSession);
-            throw new RuntimeException("Did not get positive replies from all endpoints.");
+            throw new RuntimeException("Did not get positive replies from all endpoints.
List of failed endpoint(s): " + failedNodes.toString());
         }
 
         return parentRepairSession;


Mime
View raw message