[
https://issues.apache.org/jira/browse/SCB-1020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16691257#comment-16691257
]
ASF GitHub Bot commented on SCB-1020:
-------------------------------------
liubao68 commented on a change in pull request #991: [SCB-1020]No need
unregister when bootup failure before register service
URL:
https://github.com/apache/servicecomb-java-chassis/pull/991#discussion_r234494933
##########
File path:
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;
Review comment:
No need. This happens usually because boot up fail due to bad service
definition and will print the exceptions.
----------------------------------------------------------------
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)