zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolive...@apache.org
Subject [zookeeper] branch master updated: ZOOKEEPER-3728: move traceMask calculation logic into the trace log i…
Date Thu, 26 Mar 2020 21:13:18 GMT
This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 6c7a273  ZOOKEEPER-3728: move traceMask calculation logic into the trace log i…
6c7a273 is described below

commit 6c7a273bc1c553be34dc7b9e658c6c16b8a023ef
Author: Brittany Barnes <60981978+blb93@users.noreply.github.com>
AuthorDate: Thu Mar 26 22:12:18 2020 +0100

    ZOOKEEPER-3728: move traceMask calculation logic into the trace log i…
    
    …n the FinalRequestProcessor#processRequest
    
    Author: Brittany Barnes <60981978+blb93@users.noreply.github.com>
    Author: Brittany Barnes <brittany.barnes@ibm.com>
    
    Reviewers: Enrico Olivelli <eolivelli@apache.org>, Justin Ling Mao <maoling199210191@sina.com>,
Luciano Resende <lresende@apache.org>
    
    Closes #1271 from blb93/ZOOKEEPER-3728
---
 .../java/org/apache/zookeeper/server/FinalRequestProcessor.java  | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
b/zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
index 6ad61fe..a487626 100644
--- a/zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
+++ b/zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
@@ -145,12 +145,11 @@ public class FinalRequestProcessor implements RequestProcessor {
     public void processRequest(Request request) {
         LOG.debug("Processing request:: {}", request);
 
-        // request.addRQRec(">final");
-        long traceMask = ZooTrace.CLIENT_REQUEST_TRACE_MASK;
-        if (request.type == OpCode.ping) {
-            traceMask = ZooTrace.SERVER_PING_TRACE_MASK;
-        }
         if (LOG.isTraceEnabled()) {
+            long traceMask = ZooTrace.CLIENT_REQUEST_TRACE_MASK;
+            if (request.type == OpCode.ping) {
+                traceMask = ZooTrace.SERVER_PING_TRACE_MASK;
+            }
             ZooTrace.logRequest(LOG, traceMask, 'E', request, "");
         }
         ProcessTxnResult rc = null;


Mime
View raw message