sodonnel commented on a change in pull request #2590:
URL: https://github.com/apache/ozone/pull/2590#discussion_r697399215



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java
##########
@@ -514,6 +514,13 @@ private Node chooseNodeInternal(String scope, int 
leafIndex,
       List<String> excludedScopes, Collection<Node> excludedNodes,
       Node affinityNode, int ancestorGen) {
     Preconditions.checkArgument(scope != null);
+    LOG.debug("Start choosing node[scope = {}, index = {}, excludedScopes = 
{},"

Review comment:
       That only holds true for concatenating the the values into the log 
string. If you pass complex values into the method, they are evaluated before 
the method is called and their result is passed into the method.
   
   As the parameters are expressions which need evaluated, all that will work 
happen to create their values, but then the LOG.debug call will fail to use 
them unless debug is enabled. If you are passing simple variables string into 
the log method, the `if LOG.isdebugEnable()` is not needed (eg in the other 
case below in this same PR), but for this log, I think it is needed.




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