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/01/24 11:33:12 UTC

[GitHub] [shardingsphere] menghaoranss commented on a change in pull request #15020: MGRDatabaseDiscoveryType add check data source does it exist mgr group.

menghaoranss commented on a change in pull request #15020:
URL: https://github.com/apache/shardingsphere/pull/15020#discussion_r790649801



##########
File path: shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/rule/DatabaseDiscoveryRule.java
##########
@@ -81,6 +81,7 @@ public DatabaseDiscoveryRule(final String schemaName, final Map<String, DataSour
     
     private DatabaseDiscoveryRule(final String schemaName, final Map<String, DataSource> dataSourceMap, final Collection<DatabaseDiscoveryDataSourceRuleConfiguration> dataSourceRuleConfigs,
                                   final Map<String, DatabaseDiscoveryHeartBeatConfiguration> heartBeatConfig, final Map<String, DatabaseDiscoveryType> discoveryTypes) {
+        Preconditions.checkState(!dataSourceMap.isEmpty(), "Data source can not be is empty.");

Review comment:
       Data source can not be empty.




-- 
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