You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2021/01/28 09:53:25 UTC

[cassandra] branch trunk updated: Move excessive repair debug loggings to trace level

This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new f4be27f  Move excessive repair debug loggings to trace level
f4be27f is described below

commit f4be27fd079690aab67eaac04bd237b1018140a9
Author: Alexander Dejanovski <al...@thelastpickle.com>
AuthorDate: Wed Jan 27 17:39:11 2021 +0100

    Move excessive repair debug loggings to trace level
    
    Patch by Alexander Dejanovski; reviewed by marcuse for CASSANDRA-16406
---
 CHANGES.txt                                        |  1 +
 .../org/apache/cassandra/repair/RepairJob.java     |  8 +++----
 .../org/apache/cassandra/utils/MerkleTree.java     | 26 +++++++++++-----------
 3 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 6827031..8f5e6e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0-beta5
+ * Move excessive repair debug loggings to trace level (CASSANDRA-16406)
  * Restore validation of each message's protocol version (CASSANDRA-16374)
  * Upgrade netty and chronicle-queue dependencies to get Auditing and native library loading working on arm64 architectures (CASSANDRA-16384,CASSANDRA-16392)
  * Release StreamingTombstoneHistogramBuilder spool when switching writers (CASSANDRA-14834)
diff --git a/src/java/org/apache/cassandra/repair/RepairJob.java b/src/java/org/apache/cassandra/repair/RepairJob.java
index 825d659..4fdba6e 100644
--- a/src/java/org/apache/cassandra/repair/RepairJob.java
+++ b/src/java/org/apache/cassandra/repair/RepairJob.java
@@ -300,7 +300,7 @@ public class RepairJob extends AbstractFuture<RepairResult> implements Runnable
         // We need to difference all trees one against another
         DifferenceHolder diffHolder = new DifferenceHolder(trees);
 
-        logger.debug("diffs = {}", diffHolder);
+        logger.trace("diffs = {}", diffHolder);
         PreferedNodeFilter preferSameDCFilter = (streaming, candidates) ->
                                                 candidates.stream()
                                                           .filter(node -> getDC.apply(streaming)
@@ -325,7 +325,7 @@ public class RepairJob extends AbstractFuture<RepairResult> implements Runnable
                     List<Range<Token>> toFetch = new ArrayList<>(streamsFor.get(fetchFrom));
                     assert !toFetch.isEmpty();
 
-                    logger.debug("{} is about to fetch {} from {}", address, toFetch, fetchFrom);
+                    logger.trace("{} is about to fetch {} from {}", address, toFetch, fetchFrom);
                     SyncTask task;
                     if (address.equals(local))
                     {
@@ -342,12 +342,12 @@ public class RepairJob extends AbstractFuture<RepairResult> implements Runnable
             }
             else
             {
-                logger.debug("Node {} has nothing to stream", address);
+                logger.trace("Node {} has nothing to stream", address);
             }
         }
         logger.info("Created {} optimised sync tasks based on {} merkle tree responses for {} (took: {}ms)",
                     syncTasks.size(), trees.size(), desc.parentSessionId, System.currentTimeMillis() - startedAt);
-        logger.debug("Optimised sync tasks for {}: {}", desc.parentSessionId, syncTasks);
+        logger.trace("Optimised sync tasks for {}: {}", desc.parentSessionId, syncTasks);
         return syncTasks;
     }
 
diff --git a/src/java/org/apache/cassandra/utils/MerkleTree.java b/src/java/org/apache/cassandra/utils/MerkleTree.java
index 1b92555..e4d21d2 100644
--- a/src/java/org/apache/cassandra/utils/MerkleTree.java
+++ b/src/java/org/apache/cassandra/utils/MerkleTree.java
@@ -216,15 +216,15 @@ public class MerkleTree
         {
             if (lnode instanceof Leaf || rnode instanceof Leaf)
             {
-                logger.debug("Digest mismatch detected among leaf nodes {}, {}", lnode, rnode);
+                logger.trace("Digest mismatch detected among leaf nodes {}, {}", lnode, rnode);
                 diff.add(active);
             }
             else
             {
-                logger.debug("Digest mismatch detected, traversing trees [{}, {}]", ltree, rtree);
+                logger.trace("Digest mismatch detected, traversing trees [{}, {}]", ltree, rtree);
                 if (FULLY_INCONSISTENT == differenceHelper(ltree, rtree, diff, active))
                 {
-                    logger.debug("Range {} fully inconsistent", active);
+                    logger.trace("Range {} fully inconsistent", active);
                     diff.add(active);
                 }
             }
@@ -253,13 +253,13 @@ public class MerkleTree
         {
             // If the midpoint equals either the left or the right, we have a range that's too small to split - we'll simply report the
             // whole range as inconsistent
-            logger.debug("({}) No sane midpoint ({}) for range {} , marking whole range as inconsistent", active.depth, midpoint, active);
+            logger.trace("({}) No sane midpoint ({}) for range {} , marking whole range as inconsistent", active.depth, midpoint, active);
             return FULLY_INCONSISTENT;
         }
 
         TreeRange left = new TreeRange(active.left, midpoint, active.depth + 1);
         TreeRange right = new TreeRange(midpoint, active.right, active.depth + 1);
-        logger.debug("({}) Hashing sub-ranges [{}, {}] for {} divided by midpoint {}", active.depth, left, right, active, midpoint);
+        logger.trace("({}) Hashing sub-ranges [{}, {}] for {} divided by midpoint {}", active.depth, left, right, active, midpoint);
         Node lnode, rnode;
 
         // see if we should recurse left
@@ -269,7 +269,7 @@ public class MerkleTree
         Difference ldiff = CONSISTENT;
         if (null != lnode && null != rnode && lnode.hashesDiffer(rnode))
         {
-            logger.debug("({}) Inconsistent digest on left sub-range {}: [{}, {}]", active.depth, left, lnode, rnode);
+            logger.trace("({}) Inconsistent digest on left sub-range {}: [{}, {}]", active.depth, left, lnode, rnode);
 
             if (lnode instanceof Leaf)
                 ldiff = FULLY_INCONSISTENT;
@@ -278,7 +278,7 @@ public class MerkleTree
         }
         else if (null == lnode || null == rnode)
         {
-            logger.debug("({}) Left sub-range fully inconsistent {}", active.depth, left);
+            logger.trace("({}) Left sub-range fully inconsistent {}", active.depth, left);
             ldiff = FULLY_INCONSISTENT;
         }
 
@@ -289,7 +289,7 @@ public class MerkleTree
         Difference rdiff = CONSISTENT;
         if (null != lnode && null != rnode && lnode.hashesDiffer(rnode))
         {
-            logger.debug("({}) Inconsistent digest on right sub-range {}: [{}, {}]", active.depth, right, lnode, rnode);
+            logger.trace("({}) Inconsistent digest on right sub-range {}: [{}, {}]", active.depth, right, lnode, rnode);
 
             if (rnode instanceof Leaf)
                 rdiff = FULLY_INCONSISTENT;
@@ -298,29 +298,29 @@ public class MerkleTree
         }
         else if (null == lnode || null == rnode)
         {
-            logger.debug("({}) Right sub-range fully inconsistent {}", active.depth, right);
+            logger.trace("({}) Right sub-range fully inconsistent {}", active.depth, right);
             rdiff = FULLY_INCONSISTENT;
         }
 
         if (ldiff == FULLY_INCONSISTENT && rdiff == FULLY_INCONSISTENT)
         {
             // both children are fully inconsistent
-            logger.debug("({}) Fully inconsistent range [{}, {}]", active.depth, left, right);
+            logger.trace("({}) Fully inconsistent range [{}, {}]", active.depth, left, right);
             return FULLY_INCONSISTENT;
         }
         else if (ldiff == FULLY_INCONSISTENT)
         {
-            logger.debug("({}) Adding left sub-range to diff as fully inconsistent {}", active.depth, left);
+            logger.trace("({}) Adding left sub-range to diff as fully inconsistent {}", active.depth, left);
             diff.add(left);
             return PARTIALLY_INCONSISTENT;
         }
         else if (rdiff == FULLY_INCONSISTENT)
         {
-            logger.debug("({}) Adding right sub-range to diff as fully inconsistent {}", active.depth, right);
+            logger.trace("({}) Adding right sub-range to diff as fully inconsistent {}", active.depth, right);
             diff.add(right);
             return PARTIALLY_INCONSISTENT;
         }
-        logger.debug("({}) Range {} partially inconstent", active.depth, active);
+        logger.trace("({}) Range {} partially inconstent", active.depth, active);
         return PARTIALLY_INCONSISTENT;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org