mlbiscoc commented on code in PR #2924:
URL: https://github.com/apache/solr/pull/2924#discussion_r1938046715


##########
solr/core/src/java/org/apache/solr/core/DirectoryFactory.java:
##########
@@ -369,15 +370,17 @@ public void cleanupOldIndexDirectories(
 
     int i = 0;
     if (afterCoreReload) {
-      log.info("Will not remove most recent old directory after reload {}", 
dirsList.getFirst());
+      if (log.isInfoEnabled())
+        log.info("Will not remove most recent old directory after reload {}", 
dirsList.getFirst());
       i = 1;
     }
 
-    log.info(
-        "Found {} old index directories to clean-up under {} afterReload={}",
-        dirsList.size() - i,
-        dataDirPath,
-        afterCoreReload);
+    if (log.isInfoEnabled())

Review Comment:
   Precommit was complaining because of the `getFirst()` call in the log which 
was why I added it. I also don't like it either.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to