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 2020/08/26 09:19:15 UTC
[GitHub] [dubbo-go] whitekeyboard opened a new issue #729: 配置中心功能完善
whitekeyboard opened a new issue #729:
URL: https://github.com/apache/dubbo-go/issues/729
1、在dubbo-go/common/config/environment.go文件中,有如下注释,当前不支持“application level config center configuration ”这个是否有支持计划?
`// Environment
// There is dubbo.properties file and application level config center configuration which higner than normal config center in java. So in java the
// configuration sequence will be config center > application level config center > dubbo.properties > spring bean configuration.
// But in go, neither the dubbo.properties file or application level config center configuration will not support for the time being.
// We just have config center configuration which can override configuration in consumer.yaml & provider.yaml.
// But for add these features in future ,I finish the environment struct following Environment class in java.`
2、如下代码中配置中心的全局配置如果不存在,则直接返回报错,应用级的配置不去获取,后续是否会支持应用级配置。
`func (c *BaseConfig) prepareEnvironment() error {
factory := extension.GetConfigCenterFactory(c.ConfigCenterConfig.Protocol)
dynamicConfig, err := factory.GetDynamicConfiguration(c.configCenterUrl)
config.GetEnvInstance().SetDynamicConfiguration(dynamicConfig)
if err != nil {
logger.Errorf("Get dynamic configuration error , error message is %v", err)
return perrors.WithStack(err)
}
content, err := dynamicConfig.GetProperties(c.ConfigCenterConfig.ConfigFile, config_center.WithGroup(c.ConfigCenterConfig.Group))
if err != nil {
logger.Errorf("Get config content in dynamic configuration error , error message is %v", err)
return perrors.WithStack(err)
}`
3、如下应用级的配置会被全局配置覆盖掉
`func (env *Environment) Configuration() *list.List {
cfgList := list.New()
// The sequence would be: SystemConfiguration -> ExternalConfiguration -> AppExternalConfiguration -> AbstractConfig -> PropertiesConfiguration
cfgList.PushFront(newInmemoryConfiguration(&(env.externalConfigMap)))
cfgList.PushFront(newInmemoryConfiguration(&(env.appExternalConfigMap)))
return cfgList
}
func (c *BaseConfig) fresh() {
configList := config.GetEnvInstance().Configuration()
for element := configList.Front(); element != nil; element = element.Next() {
cfg := element.Value.(*config.InmemoryConfiguration)
c.freshInternalConfig(cfg)
}
}
`
综上,应该还是应用级的配置不支持,这个是否有开发计划?
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] AlexStocks closed issue #729: 配置中心功能完善
Posted by GitBox <gi...@apache.org>.
AlexStocks closed issue #729:
URL: https://github.com/apache/dubbo-go/issues/729
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] AlexStocks commented on issue #729: 配置中心功能完善
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #729:
URL: https://github.com/apache/dubbo-go/issues/729#issuecomment-700010139
cc https://github.com/sanxun0325
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] whitekeyboard commented on issue #729: 配置中心功能完善
Posted by GitBox <gi...@apache.org>.
whitekeyboard commented on issue #729:
URL: https://github.com/apache/dubbo-go/issues/729#issuecomment-681617545
@zouyx 希望dubbo-go越来越强大!另外建议:
1、服务从配置中心拿到的配置如何确认是正确的。仅仅靠错误日志对于实际运维工作量来大。而且不容易排查。
2、provider或者consumer从配置中心拿到的配置,是否可以考虑回写到配置文件。
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] zouyx commented on issue #729: 配置中心功能完善
Posted by GitBox <gi...@apache.org>.
zouyx commented on issue #729:
URL: https://github.com/apache/dubbo-go/issues/729#issuecomment-681312849
我觉得你所说的这个点十分不错,之前我也发现了这个问题。如果能提供 PR 就更好了,在此代表 dubbo-go 社区为你表示衷心的感谢。
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] AlexStocks commented on issue #729: 配置中心功能完善
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #729:
URL: https://github.com/apache/dubbo-go/issues/729#issuecomment-682268831
> @zouyx 希望dubbo-go越来越强大!另外建议:
> 1、服务从配置中心拿到的配置如何确认是正确的。仅仅靠错误日志对于实际运维工作量来大。而且不容易排查。
> 2、provider或者consumer从配置中心拿到的配置,是否可以考虑回写到配置文件。
a very good suggestion.
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] AlexStocks edited a comment on issue #729: 配置中心功能完善
Posted by GitBox <gi...@apache.org>.
AlexStocks edited a comment on issue #729:
URL: https://github.com/apache/dubbo-go/issues/729#issuecomment-700010139
cc [sanxun](https://github.com/sanxun0325)
----------------------------------------------------------------
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.
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