[ 
https://issues.apache.org/jira/browse/SCB-1020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16691258#comment-16691258
 ] 

ASF GitHub Bot commented on SCB-1020:
-------------------------------------

liubao68 closed pull request #991: [SCB-1020]No need unregister when bootup 
failure before register service
URL: https://github.com/apache/servicecomb-java-chassis/pull/991
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/registry/AbstractServiceRegistry.java
 
b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/registry/AbstractServiceRegistry.java
index d266b71da..be33fdae3 100644
--- 
a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/registry/AbstractServiceRegistry.java
+++ 
b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/registry/AbstractServiceRegistry.java
@@ -205,6 +205,9 @@ private void createServiceCenterTask() {
 
   public boolean unregisterInstance() {
     MicroserviceInstance microserviceInstance = microservice.getInstance();
+    if (microserviceInstance.getInstanceId() == null || 
microserviceInstance.getServiceId() == null) {
+      return true;
+    }
     boolean result = 
srClient.unregisterMicroserviceInstance(microserviceInstance.getServiceId(),
         microserviceInstance.getInstanceId());
     if (!result) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> No need unregister when bootup failure before register service
> --------------------------------------------------------------
>
>                 Key: SCB-1020
>                 URL: https://issues.apache.org/jira/browse/SCB-1020
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>            Reporter: liubao
>            Assignee: liubao
>            Priority: Major
>
> e.g. when generating schema failed, unregister service will cause new 
> exception thrown and original exception not printed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to