liubao68 commented on code in PR #4533:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/4533#discussion_r1776706481


##########
clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/common/AbstractAddressManager.java:
##########
@@ -221,42 +194,7 @@ private List<String> getZoneOrRegionAddress() {
     return results;
   }
 
-  @VisibleForTesting
-  protected void checkHistory() {
-    addressCategory.forEach(address -> {
-      if (telnetTest(address)) {
-        // isolation addresses find address and restore it
-        findAndRestoreAddress(address);
-      } else {
-        recordFailState(address);
-      }
-    });
-  }
-
-  protected boolean telnetTest(String address) {
-    URI uri = parseIpPortFromURI(address);
-    if (uri == null) {
-      return false;
-    }
-    try (Socket s = new Socket()) {
-      s.connect(new InetSocketAddress(uri.getHost(), uri.getPort()), 3000);
-      return true;
-    } catch (IOException e) {
-      LOGGER.warn("ping endpoint {} failed, It will be quarantined again.", 
address);
-      return false;
-    }
-  }
-
-  private URI parseIpPortFromURI(String address) {
-    try {
-      return new URI(address);
-    } catch (URISyntaxException e) {
-      LOGGER.error("parse address [{}] failed.", address, e);
-      return null;
-    }
-  }
-
-  protected void findAndRestoreAddress(String address) {
+  public void findAndRestoreAddress(String address) {

Review Comment:
   `findAndRestoreAddress` maybe can change to a better name to 
`recoverIsolatedAddress`



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to