zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] Geker commented on issue #968: ZKUtil deleteRecursive check LOG Level before calculate the parameter
Date Thu, 06 Jun 2019 00:36:49 GMT
Geker commented on issue #968: ZKUtil  deleteRecursive check LOG Level before calculate the
parameter
URL: https://github.com/apache/zookeeper/pull/968#issuecomment-499305744
 
 
   > I don't think explicit calls on`LOG.isDebugEnabled` is needed (I always prefer writing
less code if possible) here when using parameterized logging, because the parameters will
not be evaluated until the condition check passes. See https://www.slf4j.org/faq.html#logging_performance.
   
   The fix  is prevent invoke  tree.toString(),which will double the heap usage and  may cause
OOM,even if you change the level to ERROR.
   parameterized logging can't prevent tree.toString()

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

Mime
View raw message