Move excessive repair debug loggings to trace level

Patch by Alexander Dejanovski; reviewed by marcuse for CASSANDRA-16406
This commit is contained in:
Alexander Dejanovski 2021-01-27 17:39:11 +01:00 committed by Marcus Eriksson
parent 11789e0f3c
commit f4be27fd07
3 changed files with 18 additions and 17 deletions

View File

@ -1,4 +1,5 @@
4.0-beta5 4.0-beta5
* Move excessive repair debug loggings to trace level (CASSANDRA-16406)
* Restore validation of each message's protocol version (CASSANDRA-16374) * 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) * 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) * Release StreamingTombstoneHistogramBuilder spool when switching writers (CASSANDRA-14834)

View File

@ -300,7 +300,7 @@ public class RepairJob extends AbstractFuture<RepairResult> implements Runnable
// We need to difference all trees one against another // We need to difference all trees one against another
DifferenceHolder diffHolder = new DifferenceHolder(trees); DifferenceHolder diffHolder = new DifferenceHolder(trees);
logger.debug("diffs = {}", diffHolder); logger.trace("diffs = {}", diffHolder);
PreferedNodeFilter preferSameDCFilter = (streaming, candidates) -> PreferedNodeFilter preferSameDCFilter = (streaming, candidates) ->
candidates.stream() candidates.stream()
.filter(node -> getDC.apply(streaming) .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)); List<Range<Token>> toFetch = new ArrayList<>(streamsFor.get(fetchFrom));
assert !toFetch.isEmpty(); 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; SyncTask task;
if (address.equals(local)) if (address.equals(local))
{ {
@ -342,12 +342,12 @@ public class RepairJob extends AbstractFuture<RepairResult> implements Runnable
} }
else 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)", logger.info("Created {} optimised sync tasks based on {} merkle tree responses for {} (took: {}ms)",
syncTasks.size(), trees.size(), desc.parentSessionId, System.currentTimeMillis() - startedAt); 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; return syncTasks;
} }

View File

@ -216,15 +216,15 @@ public class MerkleTree
{ {
if (lnode instanceof Leaf || rnode instanceof Leaf) 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); diff.add(active);
} }
else 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)) if (FULLY_INCONSISTENT == differenceHelper(ltree, rtree, diff, active))
{ {
logger.debug("Range {} fully inconsistent", active); logger.trace("Range {} fully inconsistent", active);
diff.add(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 // 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 // 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; return FULLY_INCONSISTENT;
} }
TreeRange left = new TreeRange(active.left, midpoint, active.depth + 1); TreeRange left = new TreeRange(active.left, midpoint, active.depth + 1);
TreeRange right = new TreeRange(midpoint, active.right, 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; Node lnode, rnode;
// see if we should recurse left // see if we should recurse left
@ -269,7 +269,7 @@ public class MerkleTree
Difference ldiff = CONSISTENT; Difference ldiff = CONSISTENT;
if (null != lnode && null != rnode && lnode.hashesDiffer(rnode)) 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) if (lnode instanceof Leaf)
ldiff = FULLY_INCONSISTENT; ldiff = FULLY_INCONSISTENT;
@ -278,7 +278,7 @@ public class MerkleTree
} }
else if (null == lnode || null == rnode) 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; ldiff = FULLY_INCONSISTENT;
} }
@ -289,7 +289,7 @@ public class MerkleTree
Difference rdiff = CONSISTENT; Difference rdiff = CONSISTENT;
if (null != lnode && null != rnode && lnode.hashesDiffer(rnode)) 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) if (rnode instanceof Leaf)
rdiff = FULLY_INCONSISTENT; rdiff = FULLY_INCONSISTENT;
@ -298,29 +298,29 @@ public class MerkleTree
} }
else if (null == lnode || null == rnode) 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; rdiff = FULLY_INCONSISTENT;
} }
if (ldiff == FULLY_INCONSISTENT && rdiff == FULLY_INCONSISTENT) if (ldiff == FULLY_INCONSISTENT && rdiff == FULLY_INCONSISTENT)
{ {
// both children are 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; return FULLY_INCONSISTENT;
} }
else if (ldiff == 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); diff.add(left);
return PARTIALLY_INCONSISTENT; return PARTIALLY_INCONSISTENT;
} }
else if (rdiff == FULLY_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); diff.add(right);
return PARTIALLY_INCONSISTENT; return PARTIALLY_INCONSISTENT;
} }
logger.debug("({}) Range {} partially inconstent", active.depth, active); logger.trace("({}) Range {} partially inconstent", active.depth, active);
return PARTIALLY_INCONSISTENT; return PARTIALLY_INCONSISTENT;
} }