mirror of https://github.com/apache/cassandra
Consolidate logging on trace level
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-19632
This commit is contained in:
parent
04dfa88329
commit
8ba2f9e8c0
|
|
@ -1,4 +1,5 @@
|
|||
5.1
|
||||
* Consolidate logging on trace level (CASSANDRA-19632)
|
||||
* Expand DDL statements on coordinator before submission to the CMS (CASSANDRA-19592)
|
||||
* Fix number of arguments of String.format() in various classes (CASSANDRA-19645)
|
||||
* Remove unused fields from config (CASSANDRA-19599)
|
||||
|
|
|
|||
|
|
@ -191,9 +191,10 @@ public class AuthorizationProxy implements InvocationHandler
|
|||
@VisibleForTesting
|
||||
public boolean authorize(Subject subject, String methodName, Object[] args)
|
||||
{
|
||||
logger.trace("Authorizing JMX method invocation {} for {}",
|
||||
methodName,
|
||||
subject == null ? "" :subject.toString().replaceAll("\\n", " "));
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Authorizing JMX method invocation {} for {}",
|
||||
methodName,
|
||||
subject == null ? "" : subject.toString().replaceAll("\\n", " "));
|
||||
|
||||
if (!isAuthSetupComplete.getAsBoolean())
|
||||
{
|
||||
|
|
@ -281,7 +282,8 @@ public class AuthorizationProxy implements InvocationHandler
|
|||
if (null == requiredPermission)
|
||||
return false;
|
||||
|
||||
logger.trace("JMX invocation of {} on {} requires permission {}", methodName, targetBean, requiredPermission);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("JMX invocation of {} on {} requires permission {}", methodName, targetBean, requiredPermission);
|
||||
|
||||
// find any JMXResources upon which the authenticated subject has been granted the
|
||||
// reqired permission. We'll do ObjectName-specific filtering & matching of resources later
|
||||
|
|
|
|||
|
|
@ -382,8 +382,11 @@ public class BatchlogManager implements BatchlogManagerMBean
|
|||
}
|
||||
catch (WriteTimeoutException|WriteFailureException e)
|
||||
{
|
||||
logger.trace("Failed replaying a batched mutation to a node, will write a hint");
|
||||
logger.trace("Failure was : {}", e.getMessage());
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace("Failed replaying a batched mutation to a node, will write a hint");
|
||||
logger.trace("Failure was : {}", e.getMessage());
|
||||
}
|
||||
// writing hints for the rest to hints, starting from i
|
||||
writeHintsForUndeliveredEndpoints(i, hintedNodes);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -243,7 +243,8 @@ public final class JavaBasedUDFunction extends UDFunction
|
|||
|
||||
String javaSource = javaSourceBuilder.toString();
|
||||
|
||||
logger.trace("Compiling Java source UDF '{}' as class '{}' using source:\n{}", name, targetClassName, javaSource);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Compiling Java source UDF '{}' as class '{}' using source:\n{}", name, targetClassName, javaSource);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -260,10 +260,9 @@ public final class CodecRegistry
|
|||
{
|
||||
checkNotNull(cacheKey.cqlType, "Parameter cqlType cannot be null");
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace(
|
||||
"Loading codec into cache: [{} <-> {}]",
|
||||
CodecRegistry.toString(cacheKey.cqlType),
|
||||
CodecRegistry.toString(cacheKey.javaType));
|
||||
logger.trace("Loading codec into cache: [{} <-> {}]",
|
||||
CodecRegistry.toString(cacheKey.cqlType),
|
||||
CodecRegistry.toString(cacheKey.javaType));
|
||||
for (TypeCodec<?> codec : codecs)
|
||||
{
|
||||
if (codec.accepts(cacheKey.cqlType)
|
||||
|
|
@ -363,10 +362,9 @@ public final class CodecRegistry
|
|||
@Override
|
||||
public void onRemoval(RemovalNotification<CacheKey, TypeCodec<?>> notification)
|
||||
{
|
||||
logger.trace(
|
||||
"Evicting codec from cache: {} (cause: {})",
|
||||
notification.getValue(),
|
||||
notification.getCause());
|
||||
logger.trace("Evicting codec from cache: {} (cause: {})",
|
||||
notification.getValue(),
|
||||
notification.getCause());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -801,7 +801,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean, Memtable.Owner
|
|||
String.format("Cannot remove temporary or obsoleted files for %s due to a problem with transaction " +
|
||||
"log files. Please check records with problems in the log messages above and fix them. " +
|
||||
"Refer to the 3.0 upgrading instructions in NEWS.txt " +
|
||||
"for a description of transaction log files.", metadata.toString()));
|
||||
"for a description of transaction log files.", metadata));
|
||||
|
||||
logger.trace("Further extra check for orphan sstable files for {}", metadata.name);
|
||||
for (Map.Entry<Descriptor,Set<Component>> sstableFiles : directories.sstableLister(Directories.OnTxnErr.IGNORE).list().entrySet())
|
||||
|
|
|
|||
|
|
@ -454,7 +454,8 @@ public class Directories
|
|||
// exclude directory if its total writeSize does not fit to data directory
|
||||
if (candidate.availableSpace < writeSize)
|
||||
{
|
||||
logger.trace("removing candidate {}, usable={}, requested={}", candidate.dataDirectory.location, candidate.availableSpace, writeSize);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("removing candidate {}, usable={}, requested={}", candidate.dataDirectory.location, candidate.availableSpace, writeSize);
|
||||
tooBig = true;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ public class DiskBoundaryManager
|
|||
logger.trace("Refreshing disk boundary cache for {}.{}", cfs.getKeyspaceName(), cfs.getTableName());
|
||||
DiskBoundaries oldBoundaries = diskBoundaries;
|
||||
diskBoundaries = getDiskBoundaryValue(cfs, metadata.partitioner);
|
||||
logger.trace("Updating boundaries from {} to {} for {}.{}", oldBoundaries, diskBoundaries, cfs.getKeyspaceName(), cfs.getTableName());
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Updating boundaries from {} to {} for {}.{}", oldBoundaries, diskBoundaries, cfs.getKeyspaceName(), cfs.getTableName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ public class TruncateVerbHandler implements IVerbHandler<TruncateRequest>
|
|||
Tracing.trace("Enqueuing response to truncate operation to {}", message.from());
|
||||
|
||||
TruncateResponse response = new TruncateResponse(truncation.keyspace, truncation.table, true);
|
||||
logger.trace("{} applied. Enqueuing response to {}@{} ", truncation, message.id(), message.from());
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("{} applied. Enqueuing response to {}@{} ", truncation, message.id(), message.from());
|
||||
MessagingService.instance().send(message.responseWith(response), message.from());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,7 +348,8 @@ public class CommitLog implements CommitLogMBean
|
|||
*/
|
||||
public void discardCompletedSegments(final TableId id, final CommitLogPosition lowerBound, final CommitLogPosition upperBound)
|
||||
{
|
||||
logger.trace("discard completed log segments for {}-{}, table {}", lowerBound, upperBound, id);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("discard completed log segments for {}-{}, table {}", lowerBound, upperBound, id);
|
||||
|
||||
// Go thru the active segment files, which are ordered oldest to newest, marking the
|
||||
// flushed CF as clean, until we reach the segment file containing the CommitLogPosition passed
|
||||
|
|
@ -368,7 +369,7 @@ public class CommitLog implements CommitLogMBean
|
|||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Not safe to delete{} commit log segment {}; dirty is {}",
|
||||
(iter.hasNext() ? "" : " active"), segment, segment.dirtyString());
|
||||
(iter.hasNext() ? "" : " active"), segment, segment.dirtyString());
|
||||
}
|
||||
|
||||
// Don't mark or try to delete any newer segments once we've reached the one containing the
|
||||
|
|
|
|||
|
|
@ -285,8 +285,9 @@ public class CommitLogArchiver
|
|||
File toFile = new File(DatabaseDescriptor.getCommitLogLocation(), descriptor.fileName());
|
||||
if (toFile.exists())
|
||||
{
|
||||
logger.trace("Skipping restore of archive {} as the segment already exists in the restore location {}",
|
||||
fromFile.path(), toFile.path());
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Skipping restore of archive {} as the segment already exists in the restore location {}",
|
||||
fromFile.path(), toFile.path());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -301,8 +301,7 @@ public class CommitLogReader
|
|||
while (statusTracker.shouldContinue() && reader.getFilePointer() < end && !reader.isEOF())
|
||||
{
|
||||
long mutationStart = reader.getFilePointer();
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Reading mutation at {}", mutationStart);
|
||||
logger.trace("Reading mutation at {}", mutationStart);
|
||||
|
||||
long claimedCRC32;
|
||||
int serializedSize;
|
||||
|
|
@ -324,7 +323,9 @@ public class CommitLogReader
|
|||
serializedSize = reader.readInt();
|
||||
if (serializedSize == LEGACY_END_OF_SEGMENT_MARKER)
|
||||
{
|
||||
logger.trace("Encountered end of segment marker at {}", reader.getFilePointer());
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Encountered end of segment marker at {}", reader.getFilePointer());
|
||||
|
||||
statusTracker.requestTermination();
|
||||
return;
|
||||
}
|
||||
|
|
@ -471,8 +472,10 @@ public class CommitLogReader
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Read mutation for {}.{}: {}", mutation.getKeyspaceName(), mutation.key(),
|
||||
"{" + StringUtils.join(mutation.getPartitionUpdates().iterator(), ", ") + "}");
|
||||
logger.trace("Read mutation for {}.{}: {{}}",
|
||||
mutation.getKeyspaceName(),
|
||||
mutation.key(),
|
||||
StringUtils.join(mutation.getPartitionUpdates().iterator(), ", "));
|
||||
|
||||
if (shouldReplay)
|
||||
handler.handleMutation(mutation, size, entryLocation, desc);
|
||||
|
|
|
|||
|
|
@ -172,8 +172,9 @@ public class CompactionController extends AbstractCompactionController
|
|||
if (candidate.getMaxLocalDeletionTime() < gcBefore)
|
||||
{
|
||||
fullyExpired.add(candidate);
|
||||
logger.trace("Dropping overlap ignored expired SSTable {} (maxLocalDeletionTime={}, gcBefore={})",
|
||||
candidate, candidate.getMaxLocalDeletionTime(), gcBefore);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Dropping overlap ignored expired SSTable {} (maxLocalDeletionTime={}, gcBefore={})",
|
||||
candidate, candidate.getMaxLocalDeletionTime(), gcBefore);
|
||||
}
|
||||
}
|
||||
return fullyExpired;
|
||||
|
|
@ -219,8 +220,9 @@ public class CompactionController extends AbstractCompactionController
|
|||
}
|
||||
else
|
||||
{
|
||||
logger.trace("Dropping expired SSTable {} (maxLocalDeletionTime={}, gcBefore={})",
|
||||
candidate, candidate.getMaxLocalDeletionTime(), gcBefore);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Dropping expired SSTable {} (maxLocalDeletionTime={}, gcBefore={})",
|
||||
candidate, candidate.getMaxLocalDeletionTime(), gcBefore);
|
||||
}
|
||||
}
|
||||
return new HashSet<>(candidates);
|
||||
|
|
|
|||
|
|
@ -246,8 +246,10 @@ public class CompactionManager implements CompactionManagerMBean, ICompactionMan
|
|||
int count = compactingCF.count(cfs);
|
||||
if (count > 0 && executor.getActiveTaskCount() >= executor.getMaximumPoolSize())
|
||||
{
|
||||
logger.trace("Background compaction is still running for {}.{} ({} remaining). Skipping",
|
||||
cfs.getKeyspaceName(), cfs.name, count);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Background compaction is still running for {}.{} ({} remaining). Skipping",
|
||||
cfs.getKeyspaceName(), cfs.name, count);
|
||||
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
|
@ -1439,10 +1441,9 @@ public class CompactionManager implements CompactionManagerMBean, ICompactionMan
|
|||
long totalkeysWritten = 0;
|
||||
|
||||
long expectedBloomFilterSize = Math.max(cfs.metadata().params.minIndexInterval,
|
||||
SSTableReader.getApproximateKeyCount(txn.originals()));
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Expected bloom filter size : {}", expectedBloomFilterSize);
|
||||
SSTableReader.getApproximateKeyCount(txn.originals()));
|
||||
|
||||
logger.trace("Expected bloom filter size : {}", expectedBloomFilterSize);
|
||||
logger.info("Cleaning up {}", sstable);
|
||||
|
||||
File compactionFileLocation = sstable.descriptor.directory;
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ public class CompactionStrategyManager implements INotificationConsumer
|
|||
holders = ImmutableList.of(transientRepairs, pendingRepairs, repaired, unrepaired);
|
||||
|
||||
cfs.getTracker().subscribe(this);
|
||||
logger.trace("{} subscribed to the data tracker.", this);
|
||||
logger.trace("Compaction manager for {}.{} subscribed to the data tracker.", cfs.keyspace.getName(), cfs.name);
|
||||
this.cfs = cfs;
|
||||
this.compactionLogger = new CompactionLogger(cfs, this);
|
||||
this.boundariesSupplier = boundariesSupplier;
|
||||
|
|
|
|||
|
|
@ -587,8 +587,7 @@ public class UnifiedCompactionStrategy extends AbstractCompactionStrategy
|
|||
|
||||
void complete()
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Level: {}", this);
|
||||
logger.trace("Level: {}", this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -635,10 +634,7 @@ public class UnifiedCompactionStrategy extends AbstractCompactionStrategy
|
|||
index, sstables.size(), maxOverlap, buckets.size(), estimatedRemainingTasks);
|
||||
|
||||
CompactionPick selected = selectedBucket.constructPick(controller);
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Returning compaction pick with selected compaction {}",
|
||||
selected);
|
||||
logger.trace("Returning compaction pick with selected compaction {}", selected);
|
||||
return selected;
|
||||
}
|
||||
|
||||
|
|
@ -665,8 +661,7 @@ public class UnifiedCompactionStrategy extends AbstractCompactionStrategy
|
|||
{
|
||||
List<SSTableReader> liveSet = sstables;
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Creating compaction pick with live set {}", liveSet);
|
||||
logger.trace("Creating compaction pick with live set {}", liveSet);
|
||||
|
||||
List<Set<SSTableReader>> overlaps = Overlaps.constructOverlapSets(liveSet,
|
||||
UnifiedCompactionStrategy::startsAfter,
|
||||
|
|
|
|||
|
|
@ -347,8 +347,7 @@ public class LifecycleTransaction extends Transactional.AbstractTransactional im
|
|||
}
|
||||
private Throwable checkpoint(Throwable accumulate)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Checkpointing staged {}", staged);
|
||||
logger.trace("Checkpointing staged {}", staged);
|
||||
|
||||
if (staged.isEmpty())
|
||||
return accumulate;
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class LogTransaction extends Transactional.AbstractTransactional implements Tran
|
|||
{
|
||||
if (!StorageService.instance.isDaemonSetupCompleted())
|
||||
logger.info("Unfinished transaction log, deleting {} ", file);
|
||||
else if (logger.isTraceEnabled())
|
||||
else
|
||||
logger.trace("Deleting {}", file);
|
||||
|
||||
Files.delete(file.toPath());
|
||||
|
|
@ -395,8 +395,7 @@ class LogTransaction extends Transactional.AbstractTransactional implements Tran
|
|||
{
|
||||
// If we can't successfully delete the DATA component, set the task to be retried later: see TransactionTidier
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Tidier running for old sstable {}", desc);
|
||||
logger.trace("Tidier running for old sstable {}", desc);
|
||||
|
||||
if (!desc.fileFor(Components.DATA).exists() && !wasNew)
|
||||
logger.error("SSTableTidier ran with no existing data file for an sstable that was not new");
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ public class SkipListMemtable extends AbstractAllocatorMemtable
|
|||
heavilyContendedRowCount++;
|
||||
}
|
||||
|
||||
if (heavilyContendedRowCount > 0)
|
||||
if (heavilyContendedRowCount > 0 && logger.isTraceEnabled())
|
||||
logger.trace("High update contention in {}/{} partitions of {} ", heavilyContendedRowCount, toFlush.size(), SkipListMemtable.this);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -84,7 +84,10 @@ public class CassandraCompressedStreamReader extends CassandraStreamReader
|
|||
assert cis.chunkBytesRead() <= totalSize;
|
||||
long sectionLength = section.upperPosition - section.lowerPosition;
|
||||
|
||||
logger.trace("[Stream #{}] Reading section {} with length {} from stream.", session.planId(), sectionIdx++, sectionLength);
|
||||
sectionIdx++;
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("[Stream #{}] Reading section {} with length {} from stream.", session.planId(), sectionIdx, sectionLength);
|
||||
|
||||
// skip to beginning of section inside chunk
|
||||
cis.position(section.lowerPosition);
|
||||
in.reset(0);
|
||||
|
|
|
|||
|
|
@ -122,8 +122,7 @@ public final class DiagnosticEventPersistence
|
|||
private void onEvent(DiagnosticEvent event)
|
||||
{
|
||||
Class<? extends DiagnosticEvent> cls = event.getClass();
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Persisting received {} event", cls.getName());
|
||||
logger.trace("Persisting received {} event", cls.getName());
|
||||
DiagnosticEventStore<Long> store = getStore(cls);
|
||||
store.store(event);
|
||||
LastEventIdBroadcaster.instance().setLastEventId(event.getClass().getName(), store.getLastEventId());
|
||||
|
|
|
|||
|
|
@ -362,13 +362,12 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
|
|||
return;
|
||||
}
|
||||
double phi = hbWnd.phi(now);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("PHI for {} : {}", ep, phi);
|
||||
logger.trace("PHI for {} : {}", ep, phi);
|
||||
|
||||
if (PHI_FACTOR * phi > getPhiConvictThreshold())
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Node {} phi {} > {}; intervals: {} mean: {}ns", new Object[]{ep, PHI_FACTOR * phi, getPhiConvictThreshold(), hbWnd, hbWnd.mean()});
|
||||
logger.trace("Node {} phi {} > {}; intervals: {} mean: {}ns", ep, PHI_FACTOR * phi, getPhiConvictThreshold(), hbWnd, hbWnd.mean());
|
||||
for (IFailureDetectionEventListener listener : fdEvntListeners)
|
||||
{
|
||||
listener.convict(ep, phi);
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ public class GossipDigestAck2VerbHandler extends GossipVerbHandler<GossipDigestA
|
|||
}
|
||||
if (!Gossiper.instance.isEnabled())
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Ignoring GossipDigestAck2Message because gossip is disabled");
|
||||
logger.trace("Ignoring GossipDigestAck2Message because gossip is disabled");
|
||||
return;
|
||||
}
|
||||
Map<InetAddressAndPort, EndpointState> remoteEpStateMap = message.payload.epStateMap;
|
||||
|
|
|
|||
|
|
@ -40,12 +40,10 @@ public class GossipDigestAckVerbHandler extends GossipVerbHandler<GossipDigestAc
|
|||
public void doVerb(Message<GossipDigestAck> message)
|
||||
{
|
||||
InetAddressAndPort from = message.from();
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Received a GossipDigestAckMessage from {}", from);
|
||||
logger.trace("Received a GossipDigestAckMessage from {}", from);
|
||||
if (!Gossiper.instance.isEnabled() && !NewGossiper.instance.isInShadowRound())
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Ignoring GossipDigestAckMessage because gossip is disabled");
|
||||
logger.trace("Ignoring GossipDigestAckMessage because gossip is disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -68,8 +66,7 @@ public class GossipDigestAckVerbHandler extends GossipVerbHandler<GossipDigestAc
|
|||
// the regular gossip conversation.
|
||||
if ((nanoTime() - Gossiper.instance.firstSynSendAt) < 0 || Gossiper.instance.firstSynSendAt == 0)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Ignoring unrequested GossipDigestAck from {}", from);
|
||||
logger.trace("Ignoring unrequested GossipDigestAck from {}", from);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +86,7 @@ public class GossipDigestAckVerbHandler extends GossipVerbHandler<GossipDigestAc
|
|||
}
|
||||
|
||||
Message<GossipDigestAck2> gDigestAck2Message = Message.out(GOSSIP_DIGEST_ACK2, new GossipDigestAck2(deltaEpStateMap));
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Sending a GossipDigestAck2Message to {}", from);
|
||||
logger.trace("Sending a GossipDigestAck2Message to {}", from);
|
||||
MessagingService.instance().send(gDigestAck2Message, from);
|
||||
|
||||
super.doVerb(message);
|
||||
|
|
|
|||
|
|
@ -43,12 +43,10 @@ public class GossipDigestSynVerbHandler extends GossipVerbHandler<GossipDigestSy
|
|||
public void doVerb(Message<GossipDigestSyn> message)
|
||||
{
|
||||
InetAddressAndPort from = message.from();
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Received a GossipDigestSynMessage from {}", from);
|
||||
logger.trace("Received a GossipDigestSynMessage from {}", from);
|
||||
if (!Gossiper.instance.isEnabled() && !NewGossiper.instance.isInShadowRound())
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Ignoring GossipDigestSynMessage because gossip is disabled");
|
||||
logger.trace("Ignoring GossipDigestSynMessage because gossip is disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -111,8 +109,7 @@ public class GossipDigestSynVerbHandler extends GossipVerbHandler<GossipDigestSy
|
|||
createShadowReply() :
|
||||
createNormalReply(gDigestList);
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Sending a GossipDigestAckMessage to {}", from);
|
||||
logger.trace("Sending a GossipDigestAckMessage to {}", from);
|
||||
MessagingService.instance().send(gDigestAckMessage, from);
|
||||
|
||||
super.doVerb(message);
|
||||
|
|
|
|||
|
|
@ -763,8 +763,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
/* Generate a random number from 0 -> size */
|
||||
int index = (size == 1) ? 0 : random.nextInt(size);
|
||||
InetAddressAndPort to = endpoints.get(index);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Sending a GossipDigestSyn to {} ...", to);
|
||||
logger.trace("Sending a GossipDigestSyn to {} ...", to);
|
||||
if (firstSynSendAt == 0)
|
||||
firstSynSendAt = nanoTime();
|
||||
MessagingService.instance().send(message, to);
|
||||
|
|
@ -867,8 +866,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
@VisibleForTesting
|
||||
void doStatusCheck()
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Performing status check ...");
|
||||
logger.trace("Performing status check ...");
|
||||
|
||||
long now = currentTimeMillis();
|
||||
long nowNano = nanoTime();
|
||||
|
|
@ -1047,8 +1045,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
reqdEndpointState = new EndpointState(new HeartBeatState(localHbGeneration, localHbVersion));
|
||||
}
|
||||
final ApplicationState key = entry.getKey();
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Adding state {}: {}" , key, value.value);
|
||||
logger.trace("Adding state {}: {}" , key, value.value);
|
||||
|
||||
states.put(key, value);
|
||||
}
|
||||
|
|
@ -1132,8 +1129,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
public void realMarkAlive(final InetAddressAndPort addr, final EndpointState localState)
|
||||
{
|
||||
checkProperThreadForStateMutation();
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("marking as alive {}", addr);
|
||||
logger.trace("marking as alive {}", addr);
|
||||
localState.markAlive();
|
||||
localState.updateTimestamp(); // prevents doStatusCheck from racing us and evicting if it was down > aVeryLongTime
|
||||
liveEndpoints.add(addr);
|
||||
|
|
@ -1143,8 +1139,8 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
logger.info("InetAddress {} is now UP", addr);
|
||||
for (IEndpointStateChangeSubscriber subscriber : subscribers)
|
||||
subscriber.onAlive(addr, localState);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Notified {}", subscribers);
|
||||
|
||||
logger.trace("Notified {}", subscribers);
|
||||
|
||||
GossiperDiagnostics.realMarkedAlive(this, addr, localState);
|
||||
}
|
||||
|
|
@ -1153,8 +1149,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
public void markDead(InetAddressAndPort addr, EndpointState localState)
|
||||
{
|
||||
checkProperThreadForStateMutation();
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("marking as down {}", addr);
|
||||
logger.trace("marking as down {}", addr);
|
||||
silentlyMarkDead(addr, localState);
|
||||
logger.info("InetAddress {} is now DOWN", addr);
|
||||
|
||||
|
|
@ -1163,8 +1158,8 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
return;
|
||||
for (IEndpointStateChangeSubscriber subscriber : subscribers)
|
||||
subscriber.onDead(addr, localState);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Notified {}", subscribers);
|
||||
|
||||
logger.trace("Notified {}", subscribers);
|
||||
|
||||
GossiperDiagnostics.markedDead(this, addr, localState);
|
||||
}
|
||||
|
|
@ -1203,8 +1198,8 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
else
|
||||
logger.info("Node {} is now part of the cluster", ep);
|
||||
}
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Adding endpoint state for {}", ep);
|
||||
|
||||
logger.trace("Adding endpoint state for {}", ep);
|
||||
endpointStateMap.put(ep, epState);
|
||||
|
||||
if (localEpState != null)
|
||||
|
|
@ -1357,8 +1352,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
|
||||
if (justRemovedEndpoints.containsKey(ep))
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Ignoring gossip for {} because it is quarantined", ep);
|
||||
logger.trace("Ignoring gossip for {} because it is quarantined", ep);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1409,8 +1403,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Ignoring remote generation {} < {}", remoteGeneration, localGeneration);
|
||||
logger.trace("Ignoring remote generation {} < {}", remoteGeneration, localGeneration);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -59,10 +59,11 @@ public final class HintVerbHandler implements IVerbHandler<HintMessage>
|
|||
// is schema agreement between the sender and the receiver.
|
||||
if (hint == null)
|
||||
{
|
||||
logger.trace("Failed to decode and apply a hint for {}: {} - table with id {} is unknown",
|
||||
address,
|
||||
hostId,
|
||||
message.payload.unknownTableID);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Failed to decode and apply a hint for {}: {} - table with id {} is unknown",
|
||||
address,
|
||||
hostId,
|
||||
message.payload.unknownTableID);
|
||||
respond(message);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ final class HintsDispatchExecutor
|
|||
*/
|
||||
private boolean dispatch(HintsDescriptor descriptor)
|
||||
{
|
||||
logger.trace("Dispatching hints file {}", descriptor.fileName());
|
||||
logger.trace("Dispatching hints file {}", descriptor.hintsFileName);
|
||||
|
||||
InetAddressAndPort address = StorageService.instance.getEndpointForHostId(hostId);
|
||||
if (address != null)
|
||||
|
|
|
|||
|
|
@ -1146,14 +1146,15 @@ public class SecondaryIndexManager implements IndexRegistry, INotificationConsum
|
|||
|
||||
int pageSize = (int) Math.max(1, Math.min(DEFAULT_PAGE_SIZE, targetPageSizeInBytes / meanRowSize));
|
||||
|
||||
logger.trace("Calculated page size {} for indexing {}.{} ({}/{}/{}/{})",
|
||||
pageSize,
|
||||
baseCfs.metadata.keyspace,
|
||||
baseCfs.metadata.name,
|
||||
meanPartitionSize,
|
||||
meanCellsPerPartition,
|
||||
meanRowsPerPartition,
|
||||
meanRowSize);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Calculated page size {} for indexing {}.{} ({}/{}/{}/{})",
|
||||
pageSize,
|
||||
baseCfs.metadata.keyspace,
|
||||
baseCfs.metadata.name,
|
||||
meanPartitionSize,
|
||||
meanCellsPerPartition,
|
||||
meanRowsPerPartition,
|
||||
meanRowSize);
|
||||
|
||||
return pageSize;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,8 +141,9 @@ public class VectorIndexSegmentSearcher extends IndexSegmentSearcher
|
|||
// so we will live with the inaccuracy.)
|
||||
var nRows = Math.toIntExact(maxSSTableRowId - minSSTableRowId + 1);
|
||||
int maxBruteForceRows = min(globalBruteForceRows, maxBruteForceRows(limit, nRows, graph.size()));
|
||||
logger.trace("Search range covers {} rows; max brute force rows is {} for sstable index with {} nodes, LIMIT {}",
|
||||
nRows, maxBruteForceRows, graph.size(), limit);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Search range covers {} rows; max brute force rows is {} for sstable index with {} nodes, LIMIT {}",
|
||||
nRows, maxBruteForceRows, graph.size(), limit);
|
||||
Tracing.trace("Search range covers {} rows; max brute force rows is {} for sstable index with {} nodes, LIMIT {}",
|
||||
nRows, maxBruteForceRows, graph.size(), limit);
|
||||
if (nRows <= maxBruteForceRows)
|
||||
|
|
@ -268,8 +269,9 @@ public class VectorIndexSegmentSearcher extends IndexSegmentSearcher
|
|||
{
|
||||
// if we have a small number of results then let TopK processor do exact NN computation
|
||||
var maxBruteForceRows = min(globalBruteForceRows, maxBruteForceRows(topK, numRows, graph.size()));
|
||||
logger.trace("SAI materialized {} rows; max brute force rows is {} for sstable index with {} nodes, LIMIT {}",
|
||||
numRows, maxBruteForceRows, graph.size(), limit);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("SAI materialized {} rows; max brute force rows is {} for sstable index with {} nodes, LIMIT {}",
|
||||
numRows, maxBruteForceRows, graph.size(), limit);
|
||||
Tracing.trace("SAI materialized {} rows; max brute force rows is {} for sstable index with {} nodes, LIMIT {}",
|
||||
numRows, maxBruteForceRows, graph.size(), limit);
|
||||
return numRows <= maxBruteForceRows;
|
||||
|
|
|
|||
|
|
@ -133,8 +133,7 @@ public class TrieMemoryIndex extends MemoryIndex
|
|||
*/
|
||||
public KeyRangeIterator search(QueryContext queryContext, Expression expression, AbstractBounds<PartitionPosition> keyRange)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Searching memtable index on expression '{}'...", expression);
|
||||
logger.trace("Searching memtable index on expression '{}'...", expression);
|
||||
|
||||
switch (expression.getIndexOperator())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -104,16 +104,12 @@ public class FilterComponent
|
|||
IFilter filter = null;
|
||||
if (!shouldUseBloomFilter(desiredFPChance))
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Bloom filter for {} will not be loaded because fpChance={} is negligible", descriptor, desiredFPChance);
|
||||
|
||||
logger.trace("Bloom filter for {} will not be loaded because fpChance={} is negligible", descriptor, desiredFPChance);
|
||||
return FilterFactory.AlwaysPresent;
|
||||
}
|
||||
else if (!components.contains(Components.FILTER) || Double.isNaN(currentFPChance))
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Bloom filter for {} will not be loaded because the filter component is missing or sstable lacks validation metadata", descriptor);
|
||||
|
||||
logger.trace("Bloom filter for {} will not be loaded because the filter component is missing or sstable lacks validation metadata", descriptor);
|
||||
return null;
|
||||
}
|
||||
else if (!isFPChanceDiffNegligible(desiredFPChance, currentFPChance) && rebuildFilterOnFPChanceChange)
|
||||
|
|
|
|||
|
|
@ -1375,8 +1375,7 @@ public abstract class SSTableReader extends SSTable implements UnfilteredSource,
|
|||
@Override
|
||||
public void tidy()
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Running instance tidier for {} with setup {}", descriptor, setup);
|
||||
logger.trace("Running instance tidier for {} with setup {}", descriptor, setup);
|
||||
|
||||
// don't try to cleanup if the sstablereader was never fully constructed
|
||||
if (!setup)
|
||||
|
|
@ -1398,14 +1397,12 @@ public abstract class SSTableReader extends SSTable implements UnfilteredSource,
|
|||
{
|
||||
public void run()
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Async instance tidier for {}, before barrier", descriptor);
|
||||
logger.trace("Async instance tidier for {}, before barrier", descriptor);
|
||||
|
||||
if (barrier != null)
|
||||
barrier.await();
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Async instance tidier for {}, after barrier", descriptor);
|
||||
logger.trace("Async instance tidier for {}, after barrier", descriptor);
|
||||
|
||||
Throwable exceptions = null;
|
||||
if (runOnClose != null) try
|
||||
|
|
@ -1438,8 +1435,7 @@ public abstract class SSTableReader extends SSTable implements UnfilteredSource,
|
|||
if (exceptions != null)
|
||||
JVMStabilityInspector.inspectThrowable(exceptions);
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Async instance tidier for {}, completed", descriptor);
|
||||
logger.trace("Async instance tidier for {}, completed", descriptor);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -252,8 +252,7 @@ public abstract class SortedTableWriter<P extends SortedTablePartitionWriter, I
|
|||
if (first == null)
|
||||
first = lastWrittenKey;
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("wrote {} at {}", key, endPosition);
|
||||
logger.trace("wrote {} at {}", key, endPosition);
|
||||
|
||||
return createRowIndexEntry(key, partitionLevelDeletion, finishResult);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,8 +282,7 @@ public class BigTableWriter extends SortedTableWriter<BigFormatPartitionWriter,
|
|||
}
|
||||
long indexEnd = writer.position();
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("wrote index entry: {} at {}", indexEntry, indexStart);
|
||||
logger.trace("wrote index entry: {} at {}", indexEntry, indexStart);
|
||||
|
||||
summary.maybeAddEntry(key, indexStart, indexEnd, dataEnd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,8 +137,9 @@ public class IndexSummaryRedistribution extends CompactionInfo.Holder
|
|||
|
||||
long remainingBytes = memoryPoolBytes - nonRedistributingOffHeapSize;
|
||||
|
||||
logger.trace("Index summaries for compacting SSTables are using {} MiB of space",
|
||||
(memoryPoolBytes - remainingBytes) / 1024.0 / 1024.0);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Index summaries for compacting SSTables are using {} MiB of space",
|
||||
(memoryPoolBytes - remainingBytes) / 1024.0 / 1024.0);
|
||||
List<T> newSSTables;
|
||||
try (Refs<SSTableReader> refs = Refs.ref(sstablesByHotness))
|
||||
{
|
||||
|
|
@ -194,8 +195,9 @@ public class IndexSummaryRedistribution extends CompactionInfo.Holder
|
|||
{
|
||||
int effectiveSamplingLevel = (int) Math.round(currentSamplingLevel * (minIndexInterval / (double) sstable.getIndexSummary().getMinIndexInterval()));
|
||||
maxSummarySize = (int) Math.round(maxSummarySize * (sstable.getIndexSummary().getMinIndexInterval() / (double) minIndexInterval));
|
||||
logger.trace("min_index_interval changed from {} to {}, so the current sampling level for {} is effectively now {} (was {})",
|
||||
sstable.getIndexSummary().getMinIndexInterval(), minIndexInterval, sstable, effectiveSamplingLevel, currentSamplingLevel);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("min_index_interval changed from {} to {}, so the current sampling level for {} is effectively now {} (was {})",
|
||||
sstable.getIndexSummary().getMinIndexInterval(), minIndexInterval, sstable, effectiveSamplingLevel, currentSamplingLevel);
|
||||
currentSamplingLevel = effectiveSamplingLevel;
|
||||
}
|
||||
|
||||
|
|
@ -214,9 +216,10 @@ public class IndexSummaryRedistribution extends CompactionInfo.Holder
|
|||
|
||||
if (effectiveIndexInterval < minIndexInterval)
|
||||
{
|
||||
// The min_index_interval was changed; re-sample to match it.
|
||||
logger.trace("Forcing resample of {} because the current index interval ({}) is below min_index_interval ({})",
|
||||
sstable, effectiveIndexInterval, minIndexInterval);
|
||||
// The min_index_interval was changed; re-sample to match it
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Forcing resample of {} because the current index interval ({}) is below min_index_interval ({})",
|
||||
sstable, effectiveIndexInterval, minIndexInterval);
|
||||
long spaceUsed = (long) Math.ceil(avgEntrySize * numEntriesAtNewSamplingLevel);
|
||||
forceResample.add(new ResampleEntry<T>(sstable, spaceUsed, newSamplingLevel));
|
||||
remainingSpace -= spaceUsed;
|
||||
|
|
@ -224,8 +227,9 @@ public class IndexSummaryRedistribution extends CompactionInfo.Holder
|
|||
else if (effectiveIndexInterval > maxIndexInterval)
|
||||
{
|
||||
// The max_index_interval was lowered; force an upsample to the effective minimum sampling level
|
||||
logger.trace("Forcing upsample of {} because the current index interval ({}) is above max_index_interval ({})",
|
||||
sstable, effectiveIndexInterval, maxIndexInterval);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Forcing upsample of {} because the current index interval ({}) is above max_index_interval ({})",
|
||||
sstable, effectiveIndexInterval, maxIndexInterval);
|
||||
newSamplingLevel = Math.max(1, (BASE_SAMPLING_LEVEL * minIndexInterval) / maxIndexInterval);
|
||||
numEntriesAtNewSamplingLevel = IndexSummaryBuilder.entriesAtSamplingLevel(newSamplingLevel, sstable.getIndexSummary().getMaxNumberOfEntries());
|
||||
long spaceUsed = (long) Math.ceil(avgEntrySize * numEntriesAtNewSamplingLevel);
|
||||
|
|
@ -275,9 +279,10 @@ public class IndexSummaryRedistribution extends CompactionInfo.Holder
|
|||
throw new CompactionInterruptedException(getCompactionInfo());
|
||||
|
||||
T sstable = entry.sstable;
|
||||
logger.trace("Re-sampling index summary for {} from {}/{} to {}/{} of the original number of entries",
|
||||
sstable, sstable.getIndexSummary().getSamplingLevel(), Downsampling.BASE_SAMPLING_LEVEL,
|
||||
entry.newSamplingLevel, Downsampling.BASE_SAMPLING_LEVEL);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Re-sampling index summary for {} from {}/{} to {}/{} of the original number of entries",
|
||||
sstable, sstable.getIndexSummary().getSamplingLevel(), Downsampling.BASE_SAMPLING_LEVEL,
|
||||
entry.newSamplingLevel, Downsampling.BASE_SAMPLING_LEVEL);
|
||||
ColumnFamilyStore cfs = Keyspace.open(sstable.metadata().keyspace).getColumnFamilyStore(sstable.metadata().id);
|
||||
long oldSize = sstable.bytesOnDisk();
|
||||
long oldSizeUncompressed = sstable.logicalBytesOnDisk();
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ public class MetadataSerializer implements IMetadataSerializer
|
|||
@Override
|
||||
public void mutate(Descriptor descriptor, String description, UnaryOperator<StatsMetadata> transform) throws IOException
|
||||
{
|
||||
if (logger.isTraceEnabled() )
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Mutating {} to {}", descriptor.fileFor(Components.STATS), description);
|
||||
|
||||
mutate(descriptor, transform);
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ public final class FileUtils
|
|||
catch (FSWriteError fse)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Could not hardlink file " + from + " to " + to, fse);
|
||||
logger.trace("Could not hardlink file {} to {}", from, to, fse);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ public final class FileUtils
|
|||
catch (IOException e)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Could not copy file" + from + " to " + to, e);
|
||||
logger.trace("Could not copy file {} to {}", from, to, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,10 +142,8 @@ public class ReplicaPlans
|
|||
if (!localLive.hasAtleast(blockFor, blockForFullReplicas))
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace(String.format("Local replicas %s are insufficient to satisfy LOCAL_QUORUM requirement of %d live replicas and %d full replicas in '%s'",
|
||||
allLive.filter(InOurDc.replicas()), blockFor, blockForFullReplicas, DatabaseDescriptor.getLocalDataCenter()));
|
||||
}
|
||||
logger.trace("Local replicas {} are insufficient to satisfy LOCAL_QUORUM requirement of {} live replicas and {} full replicas in '{}'",
|
||||
allLive.filter(InOurDc.replicas()), blockFor, blockForFullReplicas, DatabaseDescriptor.getLocalDataCenter());
|
||||
throw UnavailableException.create(consistencyLevel, blockFor, blockForFullReplicas, localLive.allReplicas(), localLive.fullReplicas());
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -214,9 +214,7 @@ public class AsyncStreamingOutputPlus extends AsyncChannelOutputPlus implements
|
|||
private long writeFileToChannelZeroCopyUnthrottled(FileChannel file) throws IOException
|
||||
{
|
||||
final long length = file.size();
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Writing {} bytes", length);
|
||||
logger.trace("Writing {} bytes", length);
|
||||
|
||||
ChannelPromise promise = beginFlush(length, 0, length);
|
||||
final DefaultFileRegion defaultFileRegion = new DefaultFileRegion(file, 0, length);
|
||||
|
|
|
|||
|
|
@ -322,7 +322,8 @@ public class InboundConnectionInitiator
|
|||
}
|
||||
|
||||
assert initiate.acceptVersions != null;
|
||||
logger.trace("Connection version {} (min {}) from {}", initiate.acceptVersions.max, initiate.acceptVersions.min, initiate.from);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Connection version {} (min {}) from {}", initiate.acceptVersions.max, initiate.acceptVersions.min, initiate.from);
|
||||
|
||||
final AcceptVersions accept;
|
||||
|
||||
|
|
|
|||
|
|
@ -142,8 +142,7 @@ public class OutboundConnectionInitiator<SuccessType extends OutboundConnectionI
|
|||
|
||||
private Future<Result<SuccessType>> initiate(EventLoop eventLoop)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("creating outbound bootstrap to {}", settings);
|
||||
logger.trace("creating outbound bootstrap to {}", settings);
|
||||
|
||||
if (!settings.authenticator.authenticate(settings.to.getAddress(), settings.to.getPort(), null, OUTBOUND_PRECONNECT))
|
||||
{
|
||||
|
|
@ -232,7 +231,8 @@ public class OutboundConnectionInitiator<SuccessType extends OutboundConnectionI
|
|||
InetAddressAndPort address = settings.to;
|
||||
InetSocketAddress peer = settings.encryption.require_endpoint_verification ? new InetSocketAddress(address.getAddress(), address.getPort()) : null;
|
||||
SslHandler sslHandler = newSslHandler(channel, sslContext, peer);
|
||||
logger.trace("creating outbound netty SslContext: context={}, engine={}", sslContext.getClass().getName(), sslHandler.engine().getClass().getName());
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("creating outbound netty SslContext: context={}, engine={}", sslContext.getClass().getName(), sslHandler.engine().getClass().getName());
|
||||
pipeline.addFirst(SSL_HANDLER_NAME, sslHandler);
|
||||
}
|
||||
pipeline.addLast("server-authentication", new ServerAuthenticationHandler(settings));
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ class ResponseVerbHandler implements IVerbHandler
|
|||
if (callbackInfo == null)
|
||||
{
|
||||
String msg = "Callback already removed for {} (from {})";
|
||||
logger.trace(msg, message.id(), message.from());
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace(msg, message.id(), message.from());
|
||||
Tracing.trace(msg, message.id(), message.from());
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -459,7 +459,8 @@ public class RepairJob extends AsyncFuture<RepairResult> implements Runnable
|
|||
List<Range<Token>> toFetch = new ArrayList<>(streamsFor.get(fetchFrom));
|
||||
assert !toFetch.isEmpty();
|
||||
|
||||
logger.trace("{} is about to fetch {} from {}", address, toFetch, fetchFrom);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("{} is about to fetch {} from {}", address, toFetch, fetchFrom);
|
||||
SyncTask task;
|
||||
if (address.equals(local))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,8 +59,11 @@ public class RangeDenormalizer
|
|||
incoming.put(r, entry.getValue().copy(r));
|
||||
}
|
||||
}
|
||||
logger.trace("denormalized {} to {}", range, newInput);
|
||||
logger.trace("denormalized incoming to {}", incoming);
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace("denormalized {} to {}", range, newInput);
|
||||
logger.trace("denormalized incoming to {}", incoming);
|
||||
}
|
||||
return newInput;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,8 @@ public class CoordinatorSession extends ConsistentSession
|
|||
|
||||
public synchronized void setParticipantState(InetAddressAndPort participant, State state)
|
||||
{
|
||||
logger.trace("Setting participant {} to state {} for repair {}", participant, state, sessionID);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Setting participant {} to state {} for repair {}", participant, state, sessionID);
|
||||
Preconditions.checkArgument(participantStates.containsKey(participant),
|
||||
"Session %s doesn't include %s",
|
||||
sessionID, participant);
|
||||
|
|
|
|||
|
|
@ -717,7 +717,8 @@ public class LocalSessions
|
|||
session.getState(), state);
|
||||
if (expected != null && session.getState() != expected)
|
||||
return false;
|
||||
logger.trace("Changing LocalSession state from {} -> {} for {}", session.getState(), state, session.sessionID);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Changing LocalSession state from {} -> {} for {}", session.getState(), state, session.sessionID);
|
||||
boolean wasCompleted = session.isCompleted();
|
||||
session.setState(state);
|
||||
session.setLastUpdate();
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ public class LoadBroadcaster implements IEndpointStateChangeSubscriber
|
|||
{
|
||||
if (!Gossiper.instance.isEnabled())
|
||||
return;
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Disseminating load info ...");
|
||||
|
||||
logger.trace("Disseminating load info ...");
|
||||
Gossiper.instance.addLocalApplicationState(ApplicationState.LOAD,
|
||||
StorageService.instance.valueFactory.load(StorageMetrics.load.getCount()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1291,7 +1291,8 @@ public class StorageProxy implements StorageProxyMBean
|
|||
Message<Batch> message = Message.out(BATCH_STORE_REQ, batch);
|
||||
for (Replica replica : replicaPlan.liveAndDown())
|
||||
{
|
||||
logger.trace("Sending batchlog store request {} to {} for {} mutations", batch.id, replica, batch.size());
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Sending batchlog store request {} to {} for {} mutations", batch.id, replica, batch.size());
|
||||
|
||||
if (replica.isSelf())
|
||||
performLocally(Stage.MUTATION, replica, () -> BatchlogManager.store(batch), handler, "Batchlog store");
|
||||
|
|
|
|||
|
|
@ -91,10 +91,7 @@ public class DiskUsageBroadcaster implements IEndpointStateChangeSubscriber
|
|||
public void startBroadcasting()
|
||||
{
|
||||
monitor.start(newState -> {
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Disseminating disk usage info: {}", newState);
|
||||
|
||||
logger.trace("Disseminating disk usage info: {}", newState);
|
||||
Gossiper.instance.addLocalApplicationState(ApplicationState.DISK_USAGE,
|
||||
StorageService.instance.valueFactory.diskUsage(newState.name()));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -171,8 +171,9 @@ public class RangeCommandIterator extends AbstractIterator<RowIterator> implemen
|
|||
int remainingRows = limit - liveReturned;
|
||||
float rowsPerRange = (float) liveReturned / (float) rangesQueried;
|
||||
int concurrencyFactor = Math.max(1, Math.min(maxConcurrencyFactor, Math.round(remainingRows / rowsPerRange)));
|
||||
logger.trace("Didn't get enough response rows; actual rows per range: {}; remaining rows: {}, new concurrent requests: {}",
|
||||
rowsPerRange, remainingRows, concurrencyFactor);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Didn't get enough response rows; actual rows per range: {}; remaining rows: {}, new concurrent requests: {}",
|
||||
rowsPerRange, remainingRows, concurrencyFactor);
|
||||
return concurrencyFactor;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,8 +93,9 @@ public class RangeCommands
|
|||
concurrencyFactor = resultsPerRange == 0.0
|
||||
? 1
|
||||
: Math.max(1, Math.min(maxConcurrencyFactor, (int) Math.ceil(command.limits().count() / resultsPerRange)));
|
||||
logger.trace("Estimated result rows per range: {}; requested rows: {}, ranges.size(): {}; concurrent range requests: {}",
|
||||
resultsPerRange, command.limits().count(), replicaPlans.size(), concurrencyFactor);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Estimated result rows per range: {}; requested rows: {}, ranges.size(): {}; concurrent range requests: {}",
|
||||
resultsPerRange, command.limits().count(), replicaPlans.size(), concurrencyFactor);
|
||||
Tracing.trace("Submitting range requests on {} ranges with a concurrency of {} ({} rows per range expected)",
|
||||
replicaPlans.size(), concurrencyFactor, resultsPerRange);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class SnapshotLoader
|
|||
|
||||
if (subdir.getParent().getFileName().toString().equals(SNAPSHOT_SUBDIR))
|
||||
{
|
||||
logger.trace("Processing directory " + subdir);
|
||||
logger.trace("Processing directory {}", subdir);
|
||||
Matcher snapshotDirMatcher = SNAPSHOT_DIR_PATTERN.matcher(subdir.toString());
|
||||
if (snapshotDirMatcher.find())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -105,7 +105,9 @@ public class FetchCMSLog
|
|||
{
|
||||
FetchCMSLog request = message.payload;
|
||||
|
||||
logger.trace("Received log fetch request {} from {}: start = {}, current = {}", request, message.from(), message.payload.lowerBound, ClusterMetadata.current().epoch);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Received log fetch request {} from {}: start = {}, current = {}", request, message.from(), message.payload.lowerBound, ClusterMetadata.current().epoch);
|
||||
|
||||
if (request.consistentFetch && !ClusterMetadataService.instance().isCurrentMember(FBUtilities.getBroadcastAddressAndPort()))
|
||||
throw new NotCMSException("This node is not in the CMS, can't generate a consistent log fetch response to " + message.from());
|
||||
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@ public class TraceStateImpl extends TraceState
|
|||
final int elapsed = elapsed();
|
||||
|
||||
executeMutation(TraceKeyspace.makeEventMutation(sessionIdBytes, message, elapsed, threadName, ttl));
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Adding <{}> to trace events", message);
|
||||
logger.trace("Adding <{}> to trace events", message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -89,9 +88,7 @@ public class TraceStateImpl extends TraceState
|
|||
}
|
||||
catch (TimeoutException ex)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Failed to wait for tracing events to complete in {} seconds",
|
||||
WAIT_FOR_PENDING_EVENTS_TIMEOUT_SECS);
|
||||
logger.trace("Failed to wait for tracing events to complete in {} seconds", WAIT_FOR_PENDING_EVENTS_TIMEOUT_SECS);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -274,12 +274,11 @@ public class CQLMessageHandler<M extends Message> extends AbstractMessageHandler
|
|||
|
||||
private void logOverload(Limit endpointReserve, Limit globalReserve, Envelope.Header header, int messageSize)
|
||||
{
|
||||
logger.trace("Discarded request of size {} with {} bytes in flight on channel. " +
|
||||
"Using {}/{} bytes of endpoint limit and {}/{} bytes of global limit. " +
|
||||
"Global rate limiter: {} Header: {}",
|
||||
messageSize, channelPayloadBytesInFlight,
|
||||
endpointReserve.using(), endpointReserve.limit(), globalReserve.using(), globalReserve.limit(),
|
||||
requestRateLimiter, header);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Discarded request of size {} with {} bytes in flight on channel. Using {}/{} bytes of endpoint limit and {}/{} bytes of global limit. Global rate limiter: {} Header: {}",
|
||||
messageSize, channelPayloadBytesInFlight,
|
||||
endpointReserve.using(), endpointReserve.limit(), globalReserve.using(), globalReserve.limit(),
|
||||
requestRateLimiter, header);
|
||||
}
|
||||
|
||||
private boolean handleProtocolException(ProtocolException exception,
|
||||
|
|
|
|||
|
|
@ -214,10 +214,10 @@ public class PreV5Handlers
|
|||
{
|
||||
ClientMetrics.instance.markRequestDiscarded();
|
||||
|
||||
logger.trace("Discarded request of size {} with {} bytes in flight on channel. {} " +
|
||||
"Global rate limiter: {} Request: {}",
|
||||
requestSize, channelPayloadBytesInFlight, endpointPayloadTracker,
|
||||
GLOBAL_REQUEST_LIMITER, request);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Discarded request of size {} with {} bytes in flight on channel. {} Global rate limiter: {} Request: {}",
|
||||
requestSize, channelPayloadBytesInFlight, endpointPayloadTracker,
|
||||
GLOBAL_REQUEST_LIMITER, request);
|
||||
|
||||
OverloadedException exception = overload == Overload.REQUESTS
|
||||
? new OverloadedException(String.format("Request breached global limit of %d requests/second. Server is " +
|
||||
|
|
|
|||
|
|
@ -208,8 +208,7 @@ public abstract class MemtableAllocator
|
|||
|
||||
if (state == LifeCycle.DISCARDING)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Allocated {} bytes whilst discarding", size);
|
||||
logger.trace("Allocated {} bytes whilst discarding", size);
|
||||
updateReclaiming();
|
||||
}
|
||||
}
|
||||
|
|
@ -226,8 +225,7 @@ public abstract class MemtableAllocator
|
|||
|
||||
if (state == LifeCycle.DISCARDING)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Allocated {} bytes whilst discarding", size);
|
||||
logger.trace("Allocated {} bytes whilst discarding", size);
|
||||
updateReclaiming();
|
||||
}
|
||||
}
|
||||
|
|
@ -250,8 +248,7 @@ public abstract class MemtableAllocator
|
|||
}
|
||||
else
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Tried to release {} bytes whilst discarding", size);
|
||||
logger.trace("Tried to release {} bytes whilst discarding", size);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,9 +81,7 @@ public class MemtableCleanerThread<P extends MemtablePool> implements Interrupti
|
|||
else
|
||||
{
|
||||
int numPendingTasks = this.numPendingTasks.incrementAndGet();
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Invoking cleaner with {} tasks pending", numPendingTasks);
|
||||
logger.trace("Invoking cleaner with {} tasks pending", numPendingTasks);
|
||||
|
||||
cleaner.clean().addCallback(this::apply);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,8 @@ public class SlabAllocator extends MemtableBufferAllocator
|
|||
if (!allocateOnHeapOnly)
|
||||
offHeapRegions.add(region);
|
||||
regionCount.incrementAndGet();
|
||||
logger.trace("{} regions now allocated in {}", regionCount, this);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("{} regions now allocated in {}", regionCount, this);
|
||||
return region;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue