You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/07/28 01:18:13 UTC

[GitHub] [shardingsphere] LeeGuoPing commented on a diff in pull request #19604: Fixed In one config, can config two - !SHARDING bug

LeeGuoPing commented on code in PR #19604:
URL: https://github.com/apache/shardingsphere/pull/19604#discussion_r931699969


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoader.java:
##########
@@ -105,9 +111,31 @@ private static Optional<YamlProxyDatabaseConfiguration> loadDatabaseConfiguratio
             result.setDatabaseName(result.getSchemaName());
         }
         Preconditions.checkNotNull(result.getDatabaseName(), "Property `databaseName` in file `%s` is required.", yamlFile.getName());
+        checkDuplicateRule(result.getRules(), yamlFile);
         return Optional.of(result);
     }
     
+    private static void checkDuplicateRule(final Collection<YamlRuleConfiguration> ruleConfigurations, final File yamlFile) {
+        if (ruleConfigurations.isEmpty()) {
+            return;
+        }
+        Multiset<Class<? extends RuleConfiguration>> multiset = HashMultiset.create();

Review Comment:
   removed



-- 
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@shardingsphere.apache.org

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