zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From breed <...@git.apache.org>
Subject [GitHub] zookeeper pull request #563: ZOOKEEPER-3072: Throttle race condition fix
Date Fri, 27 Jul 2018 05:09:24 GMT
Github user breed commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/563#discussion_r205668951
  
    --- Diff: src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java ---
    @@ -1128,9 +1128,9 @@ public void processPacket(ServerCnxn cnxn, ByteBuffer incomingBuffer)
throws IOE
                     Record rsp = processSasl(incomingBuffer,cnxn);
                     ReplyHeader rh = new ReplyHeader(h.getXid(), 0, KeeperException.Code.OK.intValue());
                     cnxn.sendResponse(rh,rsp, "response"); // not sure about 3rd arg..what
is it?
    -                return;
    --- End diff --
    
    it would be nice to keep this return since it matches the handling of the other auth logic
above.
    
    it would also be nice if this was an
    
    `} else if (h.getType() == OpCode.sasl) {`
    
    clause and the
    `}
        else {`
    
    was done outside of the if since all the other blocks will have returned. i think it makes
the logic easier to follow.


---

Mime
View raw message