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

zhaojinchao 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 de150f0c517 Remove useless code (#28138)
de150f0c517 is described below

commit de150f0c517fa952cfaea27890f0925de0c09c93
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Aug 17 13:45:06 2023 +0800

    Remove useless code (#28138)
---
 .../AlterReadwriteSplittingStorageUnitStatusStatementUpdater.java   | 6 ------
 1 file changed, 6 deletions(-)

diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdater.java
 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdater.java
index 069043ca8c3..c799f916239 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdater.java
+++ 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/AlterReadwriteSplittingStorageUnitStatusStatementUpdater.java
@@ -194,12 +194,6 @@ public final class 
AlterReadwriteSplittingStorageUnitStatusStatementUpdater impl
         return result;
     }
     
-    private Collection<String> getOnlyOneResourceRules(final Map<String, 
String> replicaStorageUnits) {
-        return replicaStorageUnits.values().stream().map(databaseName -> 
Arrays.stream(databaseName.split(",")).collect(Collectors.toMap(each -> each, 
each -> 1)).entrySet())
-                
.flatMap(Collection::stream).collect(Collectors.toMap(Entry::getKey, 
Entry::getValue, Integer::sum)).entrySet().stream()
-                .filter(entry -> entry.getValue() <= 
1).map(Entry::getKey).collect(Collectors.toSet());
-    }
-    
     private void addReplicaResource(final Map<String, String> 
replicaStorageUnits, final Entry<String, Map<String, String>> 
readwriteSplittingRule) {
         readwriteSplittingRule.getValue().entrySet().stream().filter(entry -> 
ExportableItemConstants.REPLICA_DATA_SOURCE_NAMES.equals(entry.getKey()))
                 .map(entry -> 
Arrays.asList(entry.getValue().split(","))).flatMap(Collection::stream).forEach(each
 -> put(replicaStorageUnits, each, readwriteSplittingRule.getKey()));

Reply via email to