From notifications-return-126-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Thu Jun 6 00:42:48 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id A5A68180763 for ; Thu, 6 Jun 2019 02:42:47 +0200 (CEST) Received: (qmail 58922 invoked by uid 500); 6 Jun 2019 00:42:47 -0000 Mailing-List: contact notifications-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list notifications@zookeeper.apache.org Received: (qmail 58913 invoked by uid 99); 6 Jun 2019 00:42:47 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2019 00:42:47 +0000 From: GitBox To: notifications@zookeeper.apache.org Subject: [GitHub] [zookeeper] Geker edited a comment on issue #968: ZKUtil deleteRecursive check LOG Level before calculate the parameter Message-ID: <155978176697.26009.14722631199199024801.gitbox@gitbox.apache.org> Date: Thu, 06 Jun 2019 00:42:46 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Geker edited a comment 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. @hanm The fix 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