You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/10/04 18:21:56 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #504: Fix null response for instance stoppable check when connection refused.

pkuwm commented on a change in pull request #504: Fix null response for instance stoppable check when connection refused.
URL: https://github.com/apache/helix/pull/504#discussion_r331628006
 
 

 ##########
 File path: helix-rest/src/main/java/org/apache/helix/rest/server/service/InstanceServiceImpl.java
 ##########
 @@ -220,6 +222,12 @@ private StoppableCheck performCustomInstanceCheck(String clusterId, String insta
       return new StoppableCheck(
           _customRestClient.getInstanceStoppableCheck(baseUrl, customPayLoads),
           StoppableCheck.Category.CUSTOM_INSTANCE_CHECK);
+    } catch (HttpHostConnectException ex) {
+      String msg = "Custom client side instance level health check for {}/{} failed "
+          + "because of connection refused.";
+      LOG.error(msg, clusterId, instanceName, ex);
+      return new StoppableCheck(false, Arrays.asList(instanceName),
+          StoppableCheck.Category.CUSTOM_INSTANCE_CHECK);
     } catch (IOException e) {
 
 Review comment:
   I also have the same question. But my thought was this PR is to fix null value for connection refused, so I didn't change throwing IOException. If we would like to do it, maybe a separate PR would be better?

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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org