You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/10/08 18:01:56 UTC

[GitHub] [hadoop] swagle edited a comment on issue #1612: HDDS-2260. Avoid evaluation of LOG.trace and LOG.debug statement in the read/write path (HDDS).

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org