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

psalagnac pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new ee8d6ca3320 Address logging warnings (#4420)
ee8d6ca3320 is described below

commit ee8d6ca3320b5b96db41c4931dd456a0bb7600f5
Author: Pierre Salagnac <[email protected]>
AuthorDate: Tue Jun 16 14:19:17 2026 +0200

    Address logging warnings (#4420)
---
 .../apache/solr/cloud/DistributedApiAsyncTracker.java  | 17 ++++++-----------
 .../solr/cloud/DistributedClusterStateUpdater.java     | 18 ++++++------------
 solr/core/src/java/org/apache/solr/cloud/Overseer.java |  5 ++---
 .../org/apache/solr/cloud/OverseerTaskProcessor.java   |  2 +-
 .../DistributedCollectionConfigSetCommandRunner.java   |  2 +-
 .../solr/cloud/api/collections/OverseerRoleCmd.java    |  4 ++--
 .../src/java/org/apache/solr/handler/IndexFetcher.java |  4 +---
 7 files changed, 19 insertions(+), 33 deletions(-)

diff --git 
a/solr/core/src/java/org/apache/solr/cloud/DistributedApiAsyncTracker.java 
b/solr/core/src/java/org/apache/solr/cloud/DistributedApiAsyncTracker.java
index 242c5d9a198..556ea22211d 100644
--- a/solr/core/src/java/org/apache/solr/cloud/DistributedApiAsyncTracker.java
+++ b/solr/core/src/java/org/apache/solr/cloud/DistributedApiAsyncTracker.java
@@ -364,9 +364,7 @@ public class DistributedApiAsyncTracker {
         // Unlikely race, but not impossible...
         if (log.isInfoEnabled()) {
           log.info(
-              "AsyncId ephemeral node "
-                  + getPath(asyncId)
-                  + " vanished from underneath us. Funny."); // nowarn
+              "AsyncId ephemeral node {} vanished from underneath us. Funny.", 
getPath(asyncId));
         }
         return State.NOT_FOUND;
       }
@@ -374,9 +372,8 @@ public class DistributedApiAsyncTracker {
       if (bytes == null) {
         // This is not expected. The ephemeral nodes are always created with 
content.
         log.error(
-            "AsyncId ephemeral node "
-                + getPath(asyncId)
-                + " has null content. This is unexpected (bug)."); // nowarn
+            "AsyncId ephemeral node {} has null content. This is unexpected 
(bug).",
+            getPath(asyncId));
         return State.NOT_FOUND;
       }
 
@@ -387,11 +384,9 @@ public class DistributedApiAsyncTracker {
         return State.SUBMITTED;
       } else {
         log.error(
-            "AsyncId ephemeral node "
-                + getPath(asyncId)
-                + " has unexpected content \""
-                + content
-                + "\". This is unexpected (bug)."); // nowarn
+            "AsyncId ephemeral node {} has unexpected content \"{}\". This is 
unexpected (bug).",
+            getPath(asyncId),
+            content);
         return State.NOT_FOUND;
       }
     }
diff --git 
a/solr/core/src/java/org/apache/solr/cloud/DistributedClusterStateUpdater.java 
b/solr/core/src/java/org/apache/solr/cloud/DistributedClusterStateUpdater.java
index cac60d45ce1..3c4c152bdcf 100644
--- 
a/solr/core/src/java/org/apache/solr/cloud/DistributedClusterStateUpdater.java
+++ 
b/solr/core/src/java/org/apache/solr/cloud/DistributedClusterStateUpdater.java
@@ -807,14 +807,11 @@ public class DistributedClusterStateUpdater {
         throws KeeperException, InterruptedException {
       if (log.isDebugEnabled()) {
         log.debug(
-            "Executing updates for collection "
-                + collectionName
-                + ", is creation="
-                + isCollectionCreation
-                + ", "
-                + mutations.size()
-                + " recorded mutations.",
-            new Exception("StackTraceOnly")); // nowarn
+            "Executing updates for collection {}, is creation={}, {} recorded 
mutations.",
+            collectionName,
+            isCollectionCreation,
+            mutations.size(),
+            new Exception("StackTraceOnly"));
       }
       if (mutations.isEmpty()) {
         final String err =
@@ -925,10 +922,7 @@ public class DistributedClusterStateUpdater {
       if (docCollection == null) {
         // This is possible but should be rare. Logging warn in case it is 
seen often and likely a
         // sign of another issue
-        log.warn(
-            "Processing DOWNNODE, collection "
-                + collectionName
-                + " disappeared during iteration"); // nowarn
+        log.warn("Processing DOWNNODE, collection {} disappeared during 
iteration", collectionName);
       }
 
       if (result.isPresent()) {
diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java 
b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
index e3b1651eeee..cc8e65537c5 100644
--- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java
+++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
@@ -1047,9 +1047,8 @@ public class Overseer implements SolrCloseable {
       final ZkNodeProps message = ZkNodeProps.load(data);
       final String operation = message.getStr(QUEUE_OPERATION);
       log.error(
-          "Received unexpected message on Overseer cluster state updater for "
-              + operation
-              + " when distributed updates are configured"); // nowarn
+          "Received unexpected message on Overseer cluster state updater for 
{} when distributed updates are configured",
+          operation);
       throw new RuntimeException(
           "Message "
               + operation
diff --git 
a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java 
b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
index b7755a01ef8..37dff20a2f4 100644
--- a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
@@ -703,7 +703,7 @@ public class OverseerTaskProcessor implements SolrInfoBean, 
Runnable, Closeable
   private void printTrackingMaps() {
     if (log.isDebugEnabled()) {
       log.debug("RunningTasks: {}", runningTasks.keySet());
-      log.debug("BlockedTasks: {}", blockedTasks.keySet()); // nowarn
+      log.debug("BlockedTasks: {}", blockedTasks.keySet());
     }
   }
 
diff --git 
a/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionConfigSetCommandRunner.java
 
b/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionConfigSetCommandRunner.java
index a626af3c45c..80797e0e91f 100644
--- 
a/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionConfigSetCommandRunner.java
+++ 
b/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionConfigSetCommandRunner.java
@@ -200,7 +200,7 @@ public class DistributedCollectionConfigSetCommandRunner {
             action, (String) result.get(ConfigSetCmds.BASE_CONFIGSET));
 
     if (log.isInfoEnabled()) {
-      log.info("Running Config Set API locally for " + action + " " + 
configSetName); // nowarn
+      log.info("Running Config Set API locally for {} {}", action, 
configSetName);
     }
 
     ConfigSetCommandRunner commandRunner =
diff --git 
a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerRoleCmd.java 
b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerRoleCmd.java
index 32f10bc1c6f..af4ff42be66 100644
--- 
a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerRoleCmd.java
+++ 
b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerRoleCmd.java
@@ -60,8 +60,8 @@ public class OverseerRoleCmd implements 
CollApiCmds.CollectionApiCommand {
       // No Overseer (not accessible from Collection API command execution in 
any case) so this
       // command can't be run...
       log.error(
-          "Cluster is running with distributed Collection API execution. 
Ignoring Collection API operation "
-              + operation); // nowarn
+          "Cluster is running with distributed Collection API execution. 
Ignoring Collection API operation {}",
+          operation);
       return;
     }
     ZkStateReader zkStateReader = ccc.getZkStateReader();
diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java 
b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
index 5fffe0099e1..e39c6eddfff 100644
--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
@@ -508,9 +508,7 @@ public class IndexFetcher {
 
       if (log.isInfoEnabled()) {
         log.info("Follower's generation: {}", commit.getGeneration());
-        log.info(
-            "Follower's version: {}",
-            IndexDeletionPolicyWrapper.getCommitTimestamp(commit)); // nowarn
+        log.info("Follower's version: {}", 
IndexDeletionPolicyWrapper.getCommitTimestamp(commit));
       }
 
       // Leader's version is 0 and generation is 0 -  not open for replication

Reply via email to