arshadmohammad commented on a change in pull request #1133: 
ZOOKEEPER-1260:Audit logging in ZooKeeper servers.
URL: https://github.com/apache/zookeeper/pull/1133#discussion_r343617771
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
 ##########
 @@ -311,13 +343,19 @@ public void processRequest(Request request) {
                     ((QuorumZooKeeperServer) 
zks).self.getQuorumVerifier().toString().getBytes(),
                     rc.stat);
                 err = Code.get(rc.err);
+                addAuditLog(request, cnxn, AuditConstants.OP_RECONFIG, 
rc.path, null, null, err);
                 break;
             }
             case OpCode.setACL: {
                 lastOp = "SETA";
                 rsp = new SetACLResponse(rc.stat);
                 err = Code.get(rc.err);
                 requestPathMetricsCollector.registerRequest(request.type, 
rc.path);
+                /** Here audit enable check is done to avoid getACLs() call in 
case audit is disabled. */
+                if (ZKAuditLogger.isAuditEnabled()) {
 
 Review comment:
   Refactored complete code and this is addressed in code refactoring.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to