You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/03/22 06:57:58 UTC

[GitHub] [zookeeper] Lagrang commented on a change in pull request #863: ZOOKEEPER-3320: Leader election port stop listen when hostname unresolvable for some time

Lagrang commented on a change in pull request #863: ZOOKEEPER-3320: Leader election port stop listen when hostname unresolvable for some time
URL: https://github.com/apache/zookeeper/pull/863#discussion_r268053495
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 ##########
 @@ -839,12 +839,17 @@ private void resetConnectionThreadCount() {
      */
     public class Listener extends ZooKeeperThread {
 
+        private final int portBindMaxRetry;
         volatile ServerSocket ss = null;
 
         public Listener() {
             // During startup of thread, thread name will be overridden to
             // specific election address
             super("ListenerThread");
+
+            // maximum retry count while trying to bind to election port
+            // see ZOOKEEPER-3320 for more details
+            portBindMaxRetry = Integer.getInteger("zookeeper.electionPortBindRetry", 3);
 
 Review comment:
   Add logs and validation

----------------------------------------------------------------
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