zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli commented on a change in pull request #1048: ZOOKEEPER-3188: Improve resilience to network
Date Wed, 02 Oct 2019 10:45:23 GMT
eolivelli commented on a change in pull request #1048: ZOOKEEPER-3188: Improve resilience to
network
URL: https://github.com/apache/zookeeper/pull/1048#discussion_r330477006
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java
 ##########
 @@ -255,65 +260,114 @@ protected void sockConnect(Socket sock, InetSocketAddress addr, int
timeout) thr
      * @throws X509Exception
      * @throws InterruptedException
      */
-    protected void connectToLeader(InetSocketAddress addr, String hostname) throws IOException,
InterruptedException, X509Exception {
-        this.sock = createSocket();
+    protected void connectToLeader(MultipleAddresses addr, String hostname)
+            throws IOException, InterruptedException {
+
         this.leaderAddr = addr;
+        Set<InetSocketAddress> addresses = addr.getAllAddresses();
+        ExecutorService executor = Executors.newFixedThreadPool(addresses.size());
 
 Review comment:
   we should shutdown the executor

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

Mime
View raw message