You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "yuluo-yx (via GitHub)" <gi...@apache.org> on 2024/01/24 12:36:28 UTC
[PR] fix: fix #13684 [dubbo]
yuluo-yx opened a new pull request, #13687:
URL: https://github.com/apache/dubbo/pull/13687
## What is the purpose of the change
- Fix #13684 .
--
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
Re: [PR] fix: fix #13684 [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on code in PR #13687:
URL: https://github.com/apache/dubbo/pull/13687#discussion_r1467290689
##########
dubbo-common/src/main/java/org/apache/dubbo/config/context/AbstractConfigManager.java:
##########
@@ -551,7 +551,18 @@ public <T extends AbstractConfig> List<T> loadConfigsOfTypeFromProps(Class<T> cl
if (this.getConfigs(cls).isEmpty()) {
// load single config
List<Map<String, String>> configurationMaps = environment.getConfigurationMaps();
- if (ConfigurationUtils.hasSubProperties(configurationMaps, AbstractConfig.getTypePrefix(cls))) {
+
+ // check type prefix.
+ String typePrefix = AbstractConfig.getTypePrefix(cls);
+ boolean hasSubProperties = ConfigurationUtils.hasSubProperties(configurationMaps, typePrefix);
+
+ // check ${prefix}.enabled property configuration.
+ boolean metricsEnabled = configurationMaps.stream().anyMatch(configurationMap -> {
+ String key = typePrefix + ".enabled";
Review Comment:
Should not hard code 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
Re: [PR] fix: fix #13684 [dubbo]
Posted by "bitgorust (via GitHub)" <gi...@apache.org>.
bitgorust commented on PR #13687:
URL: https://github.com/apache/dubbo/pull/13687#issuecomment-1915957660
As discussed in https://github.com/apache/dubbo/issues/13684, a new pull request https://github.com/apache/dubbo/pull/13705 is submitted to solve this problem in another way.
--
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
Re: [PR] fix: fix #13684 [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed pull request #13687: fix: fix #13684
URL: https://github.com/apache/dubbo/pull/13687
--
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
Re: [PR] fix: fix #13684 [dubbo]
Posted by "yuluo-yx (via GitHub)" <gi...@apache.org>.
yuluo-yx commented on code in PR #13687:
URL: https://github.com/apache/dubbo/pull/13687#discussion_r1468451641
##########
dubbo-common/src/main/java/org/apache/dubbo/config/context/AbstractConfigManager.java:
##########
@@ -551,7 +551,18 @@ public <T extends AbstractConfig> List<T> loadConfigsOfTypeFromProps(Class<T> cl
if (this.getConfigs(cls).isEmpty()) {
// load single config
List<Map<String, String>> configurationMaps = environment.getConfigurationMaps();
- if (ConfigurationUtils.hasSubProperties(configurationMaps, AbstractConfig.getTypePrefix(cls))) {
+
+ // check type prefix.
+ String typePrefix = AbstractConfig.getTypePrefix(cls);
+ boolean hasSubProperties = ConfigurationUtils.hasSubProperties(configurationMaps, typePrefix);
+
+ // check ${prefix}.enabled property configuration.
+ boolean metricsEnabled = configurationMaps.stream().anyMatch(configurationMap -> {
+ String key = typePrefix + ".enabled";
Review Comment:
I updated the code, extracted it into the commonconstant definition. pls review again. @AlbumenJ
--
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
Re: [PR] fix: fix #13684 [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on PR #13687:
URL: https://github.com/apache/dubbo/pull/13687#issuecomment-1922921548
Fixed in https://github.com/apache/dubbo/pull/13717
--
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