This is an automated email from the ASF dual-hosted git repository.

menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new e784e0e  merge disabled datasource reusable discovery with normal 
datasources for openGauss (#13941)
e784e0e is described below

commit e784e0e651660615f58951452c9a434f9f6eae84
Author: 刘伟 <[email protected]>
AuthorDate: Mon Dec 6 17:02:26 2021 +0800

    merge disabled datasource reusable discovery with normal datasources for 
openGauss (#13941)
    
    merge disabled datasource discovery with normal datasources for openGauss。
    
    if one DataSource disabled before,now it could come back as soon as standby 
status normal。
---
 .../dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java          | 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
 
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
index d56ebb0..6210a57 100644
--- 
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
+++ 
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
@@ -122,9 +122,6 @@ public final class OpenGaussDatabaseDiscoveryType 
implements DatabaseDiscoveryTy
     public void updateMemberState(final String schemaName, final Map<String, 
DataSource> dataSourceMap,
             final Collection<String> disabledDataSourceNames) {
         Map<String, DataSource> activeDataSourceMap = new 
HashMap<>(dataSourceMap);
-        if (!disabledDataSourceNames.isEmpty()) {
-            activeDataSourceMap.entrySet().removeIf(each -> 
disabledDataSourceNames.contains(each.getKey()));
-        }
         determineDisabledDataSource(schemaName, activeDataSourceMap);
     }
     

Reply via email to