You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by "chengyouling (via GitHub)" <gi...@apache.org> on 2024/09/26 08:34:03 UTC

[PR] [#4532] Fixed when the servicecomb engine storage pool is faulty, the registration and configuration centers cannot perform HA switchover problem [servicecomb-java-chassis]

chengyouling opened a new pull request, #4533:
URL: https://github.com/apache/servicecomb-java-chassis/pull/4533

   (no comment)


-- 
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4532] Fixed when the servicecomb engine storage pool is faulty, the registration and configuration centers cannot perform HA switchover problem [servicecomb-java-chassis]

Posted by "chengyouling (via GitHub)" <gi...@apache.org>.
chengyouling commented on code in PR #4533:
URL: https://github.com/apache/servicecomb-java-chassis/pull/4533#discussion_r1776979619


##########
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:
   fixed



-- 
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4532] Fixed when the servicecomb engine storage pool is faulty, the registration and configuration centers cannot perform HA switchover problem [servicecomb-java-chassis]

Posted by "liubao68 (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4532] Fixed when the servicecomb engine storage pool is faulty, the registration and configuration centers cannot perform HA switchover problem [servicecomb-java-chassis]

Posted by "liubao68 (via GitHub)" <gi...@apache.org>.
liubao68 merged PR #4533:
URL: https://github.com/apache/servicecomb-java-chassis/pull/4533


-- 
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org