You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/01/29 13:47:24 UTC

[GitHub] [zookeeper] anmolnar commented on a change in pull request #1210: ZOOKEEPER-3682: Stop initializing new SSL connection if ZK server is …

anmolnar commented on a change in pull request #1210: ZOOKEEPER-3682: Stop initializing new SSL connection if ZK server is …
URL: https://github.com/apache/zookeeper/pull/1210#discussion_r372390272
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxnFactory.java
 ##########
 @@ -224,6 +224,14 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception {
             NettyServerCnxn cnxn = new NettyServerCnxn(channel, zkServer, NettyServerCnxnFactory.this);
             ctx.channel().attr(CONNECTION_ATTRIBUTE).set(cnxn);
 
+            // Check the zkServer assigned to the cnxn is still running,
+            // close it before starting the heavy TLS handshake
+            if (!cnxn.isZKServerRunning()) {
+                ServerMetrics.getMetrics().CNXN_CLOSED_WITHOUT_ZK_SERVER_RUNNING.add(1);
 
 Review comment:
   Log the event here?
   Logging is also missing when connection is rejected due to maximum number of connections. Might be useful to add that as well.

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


With regards,
Apache Git Services