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


##########
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:
   why did you add this if log.isInfoEnabled check?  I confess I hate them.  
You may see them commonly in the codebase but it's only in certain scenarios 
that a code checker will complains about it (`precommit` will complain if so); 
there's no universal requirement or style.  If it didn't complain, please leave 
it be.



-- 
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