ayushtkn commented on code in PR #7053:
URL: https://github.com/apache/hadoop/pull/7053#discussion_r1765089605


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java:
##########
@@ -258,7 +258,9 @@ NamespaceInfo retrieveNamespaceInfo() throws IOException {
     while (shouldRun()) {
       try {
         nsInfo = bpNamenode.versionRequest();
-        LOG.debug(this + " received versionRequest response: " + nsInfo);
+        if (LOG.isDebugEnabled()) {
+          LOG.debug(this + " received versionRequest response: " + nsInfo);
+        }

Review Comment:
   I think if we change this to
   ```
           LOG.debug("{} received versionRequest response: {}", this, nsInfo);
   ```
   
   in this case as well, ``toString()`` won't be invoked & we can get away 
without having this ``isDebugEnabled`` gaurd



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to