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

[PR] Destroy nacos client [servicecomb-java-chassis]

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

   [ISSUE #4470] Shutdown nacos client properly.
    


-- 
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] fix: shutdown nacos client when discovery destroy [servicecomb-java-chassis]

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


-- 
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] fix: shutdown nacos client when discovery destroy [servicecomb-java-chassis]

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


##########
service-registry/registry-nacos/src/main/java/org/apache/servicecomb/registry/nacos/NacosDiscovery.java:
##########
@@ -137,7 +138,13 @@ public void run() {
 
   @Override
   public void destroy() {
-
+    if (namingService != null) {
+      try {
+        namingService.shutDown();
+      } catch (NacosException e) {
+        throw new IllegalStateException("destroy process is interrupted.");

Review Comment:
   Do not throw exception, just add some logs and ignore.   Or try catch exception in SCBEngine



-- 
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] fix: shutdown nacos client when discovery destroy [servicecomb-java-chassis]

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


##########
service-registry/registry-nacos/src/main/java/org/apache/servicecomb/registry/nacos/NacosDiscovery.java:
##########
@@ -137,7 +138,13 @@ public void run() {
 
   @Override
   public void destroy() {
-
+    if (namingService != null) {
+      try {
+        namingService.shutDown();
+      } catch (NacosException e) {
+        throw new IllegalStateException("destroy process is interrupted.");

Review Comment:
   Do not throw exception, just add some logs and ignore. 



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