cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [5/9] cassandra git commit: Remove duplicate logging of sending MerkleTree request
Date Mon, 04 Apr 2016 12:06:02 GMT
Remove duplicate logging of sending MerkleTree request

Patch by Marcus Olsson; reviewed by marcuse for CASSANDRA-11486


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

Branch: refs/heads/trunk
Commit: 1ff9df75c46edb02bf1f994e7ecc651e29b277fb
Parents: 2ed8555
Author: Marcus Olsson <marcus.olsson@ericsson.com>
Authored: Thu Mar 24 15:06:23 2016 +0100
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Mon Apr 4 13:54:00 2016 +0200

----------------------------------------------------------------------
 src/java/org/apache/cassandra/repair/RepairJob.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ff9df75/src/java/org/apache/cassandra/repair/RepairJob.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/repair/RepairJob.java b/src/java/org/apache/cassandra/repair/RepairJob.java
index 754e26f..a92233b 100644
--- a/src/java/org/apache/cassandra/repair/RepairJob.java
+++ b/src/java/org/apache/cassandra/repair/RepairJob.java
@@ -94,7 +94,6 @@ public class RepairJob extends AbstractFuture<RepairResult> implements
Runnable
             {
                 public ListenableFuture<List<TreeResponse>> apply(List<InetAddress>
endpoints) throws Exception
                 {
-                    logger.info(String.format("[repair #%s] requesting merkle trees for %s
(to %s)", desc.sessionId, desc.columnFamily, endpoints));
                     if (parallelismDegree == RepairParallelism.SEQUENTIAL)
                         return sendSequentialValidationRequest(endpoints);
                     else
@@ -104,7 +103,6 @@ public class RepairJob extends AbstractFuture<RepairResult> implements
Runnable
         }
         else
         {
-            logger.info(String.format("[repair #%s] requesting merkle trees for %s (to %s)",
desc.sessionId, desc.columnFamily, allEndpoints));
             // If not sequential, just send validation request to all replica
             validations = sendValidationRequest(allEndpoints);
         }
@@ -197,6 +195,9 @@ public class RepairJob extends AbstractFuture<RepairResult> implements
Runnable
      */
     private ListenableFuture<List<TreeResponse>> sendSequentialValidationRequest(Collection<InetAddress>
endpoints)
     {
+        String message = String.format("Requesting merkle trees for %s (to %s)", desc.columnFamily,
endpoints);
+        logger.info("[repair #{}] {}", desc.sessionId, message);
+        Tracing.traceRepair(message);
         int gcBefore = Keyspace.open(desc.keyspace).getColumnFamilyStore(desc.columnFamily).gcBefore(System.currentTimeMillis());
         List<ListenableFuture<TreeResponse>> tasks = new ArrayList<>(endpoints.size());
 
@@ -236,6 +237,9 @@ public class RepairJob extends AbstractFuture<RepairResult> implements
Runnable
      */
     private ListenableFuture<List<TreeResponse>> sendDCAwareValidationRequest(Collection<InetAddress>
endpoints)
     {
+        String message = String.format("Requesting merkle trees for %s (to %s)", desc.columnFamily,
endpoints);
+        logger.info("[repair #{}] {}", desc.sessionId, message);
+        Tracing.traceRepair(message);
         int gcBefore = Keyspace.open(desc.keyspace).getColumnFamilyStore(desc.columnFamily).gcBefore(System.currentTimeMillis());
         List<ListenableFuture<TreeResponse>> tasks = new ArrayList<>(endpoints.size());
 


Mime
View raw message