summaryrefslogtreecommitdiffstats
path: root/documentapi
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2020-04-24 13:12:46 +0200
committergjoranv <gv@verizonmedia.com>2020-04-25 02:22:55 +0200
commit25f832e613bb6087327c293b527d5445babb4319 (patch)
tree8197a5b331e845bfe91f006d9cfe8bec9a28170f /documentapi
parent4e6825b47270804a36e7d76b873ca6c2fe360eac (diff)
LogLevel.DEBUG -> Level.FINE
Diffstat (limited to 'documentapi')
-rw-r--r--documentapi/src/main/java/com/yahoo/documentapi/ProgressToken.java8
-rwxr-xr-xdocumentapi/src/main/java/com/yahoo/documentapi/VisitorIterator.java26
-rw-r--r--documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorDestinationSession.java2
-rwxr-xr-xdocumentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java32
-rw-r--r--documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java6
5 files changed, 37 insertions, 37 deletions
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/ProgressToken.java b/documentapi/src/main/java/com/yahoo/documentapi/ProgressToken.java
index 1842c1972df..eea3d6e66e8 100644
--- a/documentapi/src/main/java/com/yahoo/documentapi/ProgressToken.java
+++ b/documentapi/src/main/java/com/yahoo/documentapi/ProgressToken.java
@@ -306,7 +306,7 @@ public class ProgressToken {
&& !superbucket.contains(progress)
&& !progress.contains(superbucket)) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "updateProgress called with non-contained bucket "
+ log.log(Level.FINE, "updateProgress called with non-contained bucket "
+ "pair " + superbucket + ":" + progress + ", but allowing anyway");
}
}
@@ -323,7 +323,7 @@ public class ProgressToken {
if (!progress.equals(FINISHED_BUCKET)) {
if (entry.getState() != BucketState.BUCKET_ACTIVE) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "updateProgress called with sub-bucket that was "
+ log.log(Level.FINE, "updateProgress called with sub-bucket that was "
+ "not marked as active " + superbucket + ":" + progress);
}
} else {
@@ -362,7 +362,7 @@ public class ProgressToken {
protected void addBucket(BucketId superbucket, BucketId progress, BucketState state) {
if (progress.equals(FINISHED_BUCKET)) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Trying to add already finished superbucket "
+ log.log(Level.FINE, "Trying to add already finished superbucket "
+ superbucket + "; ignoring it");
}
return;
@@ -796,7 +796,7 @@ public class ProgressToken {
// be discarded
if (rightSibling.getProgress().getUsedBits() != 0
&& log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Bucket progress for " + rightCheck +
+ log.log(Level.FINE, "Bucket progress for " + rightCheck +
" will be lost due to merging; potential for duplicates in result-set");
}
buckets.remove(bucketToKeyWrapper(rightCheck));
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/VisitorIterator.java b/documentapi/src/main/java/com/yahoo/documentapi/VisitorIterator.java
index 83a7bc20353..ecf6d640ef7 100755
--- a/documentapi/src/main/java/com/yahoo/documentapi/VisitorIterator.java
+++ b/documentapi/src/main/java/com/yahoo/documentapi/VisitorIterator.java
@@ -111,7 +111,7 @@ public class VisitorIterator {
if (!progress.isFinished()) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Importing unfinished progress token with " +
+ log.log(Level.FINE, "Importing unfinished progress token with " +
"bits: " + progressToken.getDistributionBitCount() +
", active: " + progressToken.getActiveBucketCount() +
", pending: " + progressToken.getPendingBucketCount() +
@@ -123,7 +123,7 @@ public class VisitorIterator {
// Lower all active to pending
if (progressToken.getActiveBucketCount() > 0) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Progress token had active buckets upon range " +
+ log.log(Level.FINE, "Progress token had active buckets upon range " +
"construction. Setting these as pending");
}
progressToken.setAllBucketsToState(ProgressToken.BucketState.BUCKET_PENDING);
@@ -137,7 +137,7 @@ public class VisitorIterator {
correctTruncatedBucketCursor();
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Partial bucket space progress; continuing "+
+ log.log(Level.FINE, "Partial bucket space progress; continuing "+
"from position " + progressToken.getBucketCursor());
}
}
@@ -196,7 +196,7 @@ public class VisitorIterator {
// single-bit bucket once did
if (isLosslessResetPossible()) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "At start of bucket space and all " +
+ log.log(Level.FINE, "At start of bucket space and all " +
"buckets have no progress; doing a lossless reset " +
"instead of splitting/merging");
}
@@ -263,7 +263,7 @@ public class VisitorIterator {
}
}
if ((bucketsSplit > 0 || bucketsMerged > 0) && log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Existing progress' pending buckets had inconsistent " +
+ log.log(Level.FINE, "Existing progress' pending buckets had inconsistent " +
"distribution bits; performed " + bucketsSplit + " split ops and " +
bucketsMerged + " merge ops. Pending: " + pendingBefore + " -> " +
p.getPendingBucketCount());
@@ -335,7 +335,7 @@ public class VisitorIterator {
if (progressToken.getActiveBucketCount() > 0) {
flushActive = true;
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Holding off new/pending buckets and consistency " +
+ log.log(Level.FINE, "Holding off new/pending buckets and consistency " +
"correction until all " + progress.getActiveBucketCount() +
" active buckets have been updated");
}
@@ -350,7 +350,7 @@ public class VisitorIterator {
correctInconsistentPending(distributionBitCount);
if (delta > 0) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Increasing distribution bits for full bucket " +
+ log.log(Level.FINE, "Increasing distribution bits for full bucket " +
"space range source from " + progressToken.getDistributionBitCount() + " to " +
distributionBitCount);
}
@@ -360,7 +360,7 @@ public class VisitorIterator {
progressToken.setBucketCursor(progressToken.getBucketCursor() << delta);
} else if (delta < 0) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Decreasing distribution bits for full bucket " +
+ log.log(Level.FINE, "Decreasing distribution bits for full bucket " +
"space range source from " + progressToken.getDistributionBitCount() +
" to " + distributionBitCount + " bits");
}
@@ -387,14 +387,14 @@ public class VisitorIterator {
// consistency fix. This simplifies things greatly
assert(flushActive);
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Received non-finished bucket " +
+ log.log(Level.FINE, "Received non-finished bucket " +
superbucket + " with wrong distribution bit count (" +
superbucket.getUsedBits() + "). Waiting to correct " +
"until all active are done");
}
} else {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Received finished bucket " +
+ log.log(Level.FINE, "Received finished bucket " +
superbucket + " with wrong distribution bit count (" +
superbucket.getUsedBits() + "). Waiting to correct " +
"until all active are done");
@@ -405,7 +405,7 @@ public class VisitorIterator {
if (progressToken.getActiveBucketCount() == 0) {
if (flushActive) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "All active buckets flushed, " +
+ log.log(Level.FINE, "All active buckets flushed, " +
"correcting progress token and continuing normal operation");
}
// Trigger the actual bucket state change this time
@@ -509,7 +509,7 @@ public class VisitorIterator {
progress.setDistributionBitCount(distributionBitCount);
this.distributionBitCount = distributionBitCount;
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Set distribution bit count to "
+ log.log(Level.FINE, "Set distribution bit count to "
+ distributionBitCount + " for explicit bucket source (no-op)");
}
}
@@ -722,7 +722,7 @@ public class VisitorIterator {
bucketSource.setDistributionBitCount(distBits, progressToken);
distributionBitCount = distBits;
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Set visitor iterator distribution bit count to "
+ log.log(Level.FINE, "Set visitor iterator distribution bit count to "
+ distBits);
}
}
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorDestinationSession.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorDestinationSession.java
index 247364c8a7a..92abd8c98ca 100644
--- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorDestinationSession.java
+++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorDestinationSession.java
@@ -56,7 +56,7 @@ public class MessageBusVisitorDestinationSession implements VisitorDestinationSe
public void ack(AckToken token) {
try {
- log.log(LogLevel.DEBUG, "Sending ack " + token.ackObject);
+ log.log(Level.FINE, "Sending ack " + token.ackObject);
session.reply((Reply) token.ackObject);
} catch (Exception e) {
e.printStackTrace();
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java
index b6e822b597e..c2c36d01805 100755
--- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java
+++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java
@@ -405,7 +405,7 @@ public class MessageBusVisitorSession implements VisitorSession {
synchronized (progress.getToken()) {
this.startTimeNanos = clock.monotonicNanoTime();
if (progress.getIterator().isDone()) {
- log.log(LogLevel.DEBUG, sessionName + ": progress token indicates " +
+ log.log(Level.FINE, sessionName + ": progress token indicates " +
"session is done before it could even start; no-op");
return;
}
@@ -433,7 +433,7 @@ public class MessageBusVisitorSession implements VisitorSession {
* successful, will be equal to newState.
*/
private StateDescription transitionTo(StateDescription newState) {
- log.log(LogLevel.DEBUG, sessionName + ": attempting transition to state " + newState);
+ log.log(Level.FINE, sessionName + ": attempting transition to state " + newState);
switch (newState.getState()) {
case WORKING:
assert(state.getState() == State.NOT_STARTED);
@@ -450,7 +450,7 @@ public class MessageBusVisitorSession implements VisitorSession {
default:
com.yahoo.protect.Process.logAndDie("Invalid target transition state: " + newState);
}
- log.log(LogLevel.DEBUG, "Session '" + sessionName + "' is now in state " + state);
+ log.log(Level.FINE, "Session '" + sessionName + "' is now in state " + state);
return state;
}
@@ -500,7 +500,7 @@ public class MessageBusVisitorSession implements VisitorSession {
// If no cluster route has been set by user arguments, attempt to retrieve it from mbus config.
if (params.getRoute() == null || !params.getRoute().hasHops()) {
params.setRoute(getClusterRoute(routingTable));
- log.log(LogLevel.DEBUG, "No route specified; resolved implicit " +
+ log.log(Level.FINE, "No route specified; resolved implicit " +
"storage cluster: " + params.getRoute().toString());
}
}
@@ -575,7 +575,7 @@ public class MessageBusVisitorSession implements VisitorSession {
progressToken);
} else {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "parameters specify explicit bucket set " +
+ log.log(Level.FINE, "parameters specify explicit bucket set " +
"to visit; using it rather than document selection (" +
params.getBucketsToVisit().size() + " buckets given)");
}
@@ -647,7 +647,7 @@ public class MessageBusVisitorSession implements VisitorSession {
VisitorIterator.BucketProgress bucket = progress.getIterator().getNext();
Result result = sender.send(createMessage(bucket));
if (result.isAccepted()) {
- log.log(LogLevel.DEBUG, sessionName + ": sent CreateVisitor for bucket " +
+ log.log(Level.FINE, sessionName + ": sent CreateVisitor for bucket " +
bucket.getSuperbucket() + " with progress " + bucket.getProgress());
++pendingMessageCount;
} else {
@@ -688,7 +688,7 @@ public class MessageBusVisitorSession implements VisitorSession {
// 'done' is only ever written when token mutex is held, so safe to check
// outside of completionMonitor lock.
assert(!done) : "Session was marked as completed more than once";
- log.log(LogLevel.DEBUG, "Visitor session '" + sessionName + "' has completed");
+ log.log(Level.FINE, "Visitor session '" + sessionName + "' has completed");
if (params.getLocalDataHandler() != null) {
params.getLocalDataHandler().onDone();
}
@@ -755,7 +755,7 @@ public class MessageBusVisitorSession implements VisitorSession {
@Override
public void run() {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Visitor session " + sessionName + ": Received message " + message);
+ log.log(Level.FINE, "Visitor session " + sessionName + ": Received message " + message);
}
try {
if (message instanceof VisitorInfoMessage) {
@@ -810,7 +810,7 @@ public class MessageBusVisitorSession implements VisitorSession {
msg.swapState(reply);
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Visitor session " + sessionName +
+ log.log(Level.FINE, "Visitor session " + sessionName +
": Received VisitorInfo with " +
msg.getFinishedBuckets().size() + " finished buckets");
}
@@ -902,7 +902,7 @@ public class MessageBusVisitorSession implements VisitorSession {
progress.getIterator().update(bucket, subProgress);
String message = getErrorMessage(reply.getError(0));
- log.log(LogLevel.DEBUG, sessionName + ": received error reply for bucket " +
+ log.log(Level.FINE, sessionName + ": received error reply for bucket " +
bucket + " with message '" + message + "'");
if (isFatalError(reply)) {
@@ -1027,7 +1027,7 @@ public class MessageBusVisitorSession implements VisitorSession {
BucketId superbucket = msg.getBuckets().get(0);
BucketId subBucketProgress = reply.getLastBucket();
- log.log(LogLevel.DEBUG, sessionName + ": received CreateVisitorReply for bucket " +
+ log.log(Level.FINE, sessionName + ": received CreateVisitorReply for bucket " +
superbucket + " with progress " + subBucketProgress);
progress.getIterator().update(superbucket, subBucketProgress);
@@ -1045,7 +1045,7 @@ public class MessageBusVisitorSession implements VisitorSession {
int newMaxBuckets = Math.max(Math.min((int)(params.getMaxBucketsPerVisitor()
* params.getDynamicMaxBucketsIncreaseFactor()), 128), 1);
params.setMaxBucketsPerVisitor(newMaxBuckets);
- log.log(LogLevel.DEBUG, sessionName + ": increasing max buckets per visitor to "
+ log.log(Level.FINE, sessionName + ": increasing max buckets per visitor to "
+ params.getMaxBucketsPerVisitor());
}
}
@@ -1055,7 +1055,7 @@ public class MessageBusVisitorSession implements VisitorSession {
ClusterState newState = new ClusterState(reply.getSystemState());
int stateBits = newState.getDistributionBitCount();
if (stateBits != progress.getIterator().getDistributionBitCount()) {
- log.log(LogLevel.DEBUG, "System state changed; now at " +
+ log.log(Level.FINE, "System state changed; now at " +
stateBits + " distribution bits");
// Update the internal state of the visitor iterator. If we're increasing
// the number of distribution bits, this may lead to splitting of pending
@@ -1102,7 +1102,7 @@ public class MessageBusVisitorSession implements VisitorSession {
@Override
public void ack(AckToken token) {
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Visitor session " + sessionName +
+ log.log(Level.FINE, "Visitor session " + sessionName +
": Sending ack " + token.ackObject);
}
// No locking here; replying should be thread safe in itself
@@ -1144,7 +1144,7 @@ public class MessageBusVisitorSession implements VisitorSession {
@Override
public void destroy() {
- log.log(LogLevel.DEBUG, sessionName + ": synchronous destroy() called");
+ log.log(Level.FINE, sessionName + ": synchronous destroy() called");
try {
synchronized (progress.getToken()) {
synchronized (completionMonitor) {
@@ -1172,7 +1172,7 @@ public class MessageBusVisitorSession implements VisitorSession {
} catch (Exception e) {
log.log(LogLevel.ERROR, "Caught exception destroying communication interfaces", e);
}
- log.log(LogLevel.DEBUG, sessionName + ": synchronous destroy() done");
+ log.log(Level.FINE, sessionName + ": synchronous destroy() done");
}
}
}
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java
index 236a2a6c0f6..f89ab28ee16 100644
--- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java
+++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java
@@ -395,7 +395,7 @@ public class StoragePolicy extends SlobrokPolicy {
return targetSpec;
} else {
sendRandomReason = "Want to use distributor " + target + " but it is not in slobrok. Sending to random.";
- log.log(LogLevel.DEBUG, "Target distributor is not in slobrok");
+ log.log(Level.FINE, "Target distributor is not in slobrok");
}
} else {
context.setContext(new MessageContext(cachedClusterState));
@@ -407,7 +407,7 @@ public class StoragePolicy extends SlobrokPolicy {
context.setReply(reply);
return null;
} catch (Distribution.NoDistributorsAvailableException e) {
- log.log(LogLevel.DEBUG, "No distributors available; clearing cluster state");
+ log.log(Level.FINE, "No distributors available; clearing cluster state");
safeCachedClusterState.set(null);
sendRandomReason = "No distributors available. Sending to random distributor.";
context.setContext(createRandomDistributorTargetContext());
@@ -482,7 +482,7 @@ public class StoragePolicy extends SlobrokPolicy {
// reject an operation bound to a particular bucket if it does not own the bucket in _both_
// the current and the next (transition target) state. Since it can happen during normal operation
// and will happen per client operation, we keep this as debug level to prevent spamming the logs.
- log.log(LogLevel.DEBUG, msg);
+ log.log(Level.FINE, msg);
} else if (newState.getVersion() > context.usedState.getVersion()) {
if (reply.getTrace().shouldTrace(1)) {
reply.getTrace().trace(1, "Message sent to distributor " + context.calculatedDistributor +