You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "xiaoqin.fu (JIRA)" <ji...@apache.org> on 2019/08/02 10:56:00 UTC

[jira] [Created] (ZOOKEEPER-3487) Execution the same conditional statement twice in ZooTrace

xiaoqin.fu created ZOOKEEPER-3487:
-------------------------------------

             Summary: Execution the same conditional statement twice in ZooTrace
                 Key: ZOOKEEPER-3487
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3487
             Project: ZooKeeper
          Issue Type: Improvement
          Components: server
    Affects Versions: 3.4.14, 3.5.5, 3.4.13, 3.4.12, 3.4.11
         Environment: 	Ubuntu 16.04.3 LTS
	Open JDK version "1.8.0_191" build 25.191-b12
            Reporter: xiaoqin.fu


	In org.apache.zookeeper.server.ZooTrace, a conditional statement may be executed twice:
	Method logQuorumPacket calls method logTraceMessage with same conditional statement "if (isTraceEnabled(log, mask))".
	If other methods call logQuorumPacket, they execute "if (isTraceEnabled(log, mask))" conditional statement twice.
	We should remove one of two "if (isTraceEnabled(log, mask))" conditional statements.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)