From notifications-return-124-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Thu Jun 6 00:36:50 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 E582F18065D for ; Thu, 6 Jun 2019 02:36:49 +0200 (CEST) Received: (qmail 53101 invoked by uid 500); 6 Jun 2019 00:36:49 -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 53092 invoked by uid 99); 6 Jun 2019 00:36:49 -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:36:49 +0000 From: GitBox To: notifications@zookeeper.apache.org Subject: [GitHub] [zookeeper] Geker commented on issue #968: ZKUtil deleteRecursive check LOG Level before calculate the parameter Message-ID: <155978140926.22224.18130936051622716245.gitbox@gitbox.apache.org> Date: Thu, 06 Jun 2019 00:36:49 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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