FlyingZC commented on code in PR #20770:
URL: https://github.com/apache/shardingsphere/pull/20770#discussion_r965847862


##########
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/DatabaseTypeEngine.java:
##########
@@ -44,12 +44,14 @@ public final class DatabaseTypeEngine {
     /**
      * Get protocol type.
      * 
+     *
+     * @param databaseName database name
      * @param databaseConfig database configuration
      * @param props props
      * @return protocol type
      */
-    public static DatabaseType getProtocolType(final DatabaseConfiguration 
databaseConfig, final ConfigurationProperties props) {
-        return findConfiguredDatabaseType(props).orElseGet(() -> 
getDatabaseType(databaseConfig.getDataSources().values()));
+    public static DatabaseType getProtocolType(final String databaseName, 
final DatabaseConfiguration databaseConfig, final ConfigurationProperties 
props) {
+        return findConfiguredDatabaseType(props).orElseGet(() -> 
getDatabaseType(DataSourceStateManager.getInstance().getNonDisabledDataSources(databaseName,
 databaseConfig)));

Review Comment:
   You are right



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to