You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/11/05 02:14:18 UTC

[GitHub] [dubbo-go] justxuewei commented on a change in pull request #1560: [#1559]: djust the startup process of the configuration center

justxuewei commented on a change in pull request #1560:
URL: https://github.com/apache/dubbo-go/pull/1560#discussion_r743346031



##########
File path: config/config_center_config.go
##########
@@ -132,11 +132,19 @@ func (c *CenterConfig) toURL() (*common.URL, error) {
 // it will prepare the environment
 func startConfigCenter(rc *RootConfig) error {
 	cc := rc.ConfigCenter
-	strConf, err := cc.prepareEnvironment()
+	dynamicConfig, err := cc.GetDynamicConfiguration()
 	if err != nil {
-		return errors.WithMessagef(err, "start config center error!")
+		logger.Errorf("Start dynamic configuration center error, error message is %v", err)
+		return err
 	}
+	envInstance := conf.GetEnvInstance()
+	envInstance.SetDynamicConfiguration(dynamicConfig)
 
+	strConf, err := dynamicConfig.GetProperties(cc.DataId, config_center.WithGroup(cc.Group))
+	if err != nil {
+		logger.Warnf("Dynamic onfig center has started, but config may not be initialized, because %s", err)
+		return nil

Review comment:
       Why return nil here?




-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org