swagle edited a comment on issue #1612: HDDS-2260. Avoid evaluation of 
LOG.trace and LOG.debug statement in the read/write path (HDDS).
URL: https://github.com/apache/hadoop/pull/1612#issuecomment-539631944
 
 
   @bharatviswa504 The problem is the parameters are evaluated **fully** as 
function arguments before they are sent to slf4j. The toString() call is what 
happens late. This results in an anti-patter where a developer things writing a 
trace call with smth like LOG.trace(ExceptionUtils.stackTrace(new 
IOException())) [cooked up call], let's say can be done without if statement in 
a busy part of the codebase without an side-effects and ends up being a perf 
bottleneck. We already have such examples in Ozone code. Hence, decided to do a 
blanket change first and then write something to do a checkstyle verification 
later.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to