dlogothetis commented on a change in pull request #118: Fix issues with channel 
re-connection
URL: https://github.com/apache/giraph/pull/118#discussion_r358384478
 
 

 ##########
 File path: 
giraph-core/src/main/java/org/apache/giraph/comm/netty/ChannelRotater.java
 ##########
 @@ -73,9 +76,9 @@ public synchronized void addChannel(Channel channel) {
    */
   public synchronized Channel nextChannel() {
     if (channelList.isEmpty()) {
-      throw new IllegalArgumentException(
-          "nextChannel: No channels exist for hostname " +
-              address.getHostName());
+      LOG.warn("nextChannel: No channels exist for hostname " +
+        address.getHostName());
+      return null;
 
 Review comment:
   This is called from NettyClient.getNextChannel() which will do a maximum 
number of retries. However, this counter is reset every time there is a 
failure, so it is possible that if the channel gets dropped, that we keep 
retrying. What I will do is make this counter global. The current max is 1000 
retries, so that should be enough.

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