Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3708

Move Logging Code into Logging Guard in Learner

    XMLWordPrintableJSON

Details

    Description

      Learner.java
          void readPacket(QuorumPacket pp) throws IOException {
      ...
              long traceMask = ZooTrace.SERVER_PACKET_TRACE_MASK;
              if (pp.getType() == Leader.PING) {
                  traceMask = ZooTrace.SERVER_PING_TRACE_MASK;
              }
              if (LOG.isTraceEnabled()) {
                  ZooTrace.logQuorumPacket(LOG, traceMask, 'i', pp);
              }
          }
      

      The traceMask only matters if trace is enabled, so move it and the associated code into the logging guard.

      Attachments

        Issue Links

          Activity

            People

              belugabehr David Mollitor
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h