You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/05/10 08:53:14 UTC

[shardingsphere] branch master updated: Rename name config item form yaml for Readwrite-splitting (#10294)

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

panjuan 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 3ce918e  Rename name config item form yaml for Readwrite-splitting (#10294)
3ce918e is described below

commit 3ce918ed0b91242e707dfd2bf74269b1755f76fd
Author: Liang Zhang <te...@163.com>
AuthorDate: Mon May 10 16:52:40 2021 +0800

    Rename name config item form yaml for Readwrite-splitting (#10294)
---
 .../content/features/test-engine/performance-test-sysbench.cn.md | 6 ++----
 .../content/features/test-engine/performance-test-sysbench.en.md | 6 ++----
 .../document/content/features/test-engine/performance-test.cn.md | 3 +--
 .../document/content/features/test-engine/performance-test.en.md | 9 ++++-----
 .../user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md | 5 ++---
 .../user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md | 5 ++---
 .../resources/META-INF/zookeeper/local/readwrite-splitting.yaml  | 1 -
 .../src/main/resources/META-INF/hint-write-only.yaml             | 1 -
 .../resources/META-INF/readwrite-splitting-shadow-databases.yaml | 1 -
 .../src/main/resources/META-INF/readwrite-splitting.yaml         | 1 -
 .../src/main/resources/conf/config-readwrite-splitting.yaml      | 7 +++----
 .../src/main/resources/conf/config-write-only.yaml               | 1 -
 .../src/main/resources/conf/config-readwrite-splitting.yaml      | 2 --
 .../rule/YamlReadwriteSplittingDataSourceRuleConfiguration.java  | 2 --
 .../converter/AlterReadwriteSplittingRuleStatementConverter.java | 1 -
 .../CreateReadwriteSplittingRuleStatementConverter.java          | 1 -
 ...teSplittingRuleAlgorithmProviderConfigurationYamlSwapper.java | 1 -
 .../swapper/ReadwriteSplittingRuleConfigurationYamlSwapper.java  | 1 -
 ...littingRuleAlgorithmProviderConfigurationYamlSwapperTest.java | 1 -
 .../ReadwriteSplittingRuleConfigurationYamlSwapperTest.java      | 3 ---
 .../src/test/resources/yaml/readwrite-splitting-rule.yaml        | 1 -
 .../yaml/registryCenter/data-readwrite-splitting-rule.yaml       | 1 -
 .../src/test/resources/config/config-calcite.yaml                | 1 -
 .../src/test/resources/config/config-readwrite-splitting.yaml    | 1 -
 .../configWithReadwriteSplittingDataSourceWithProps.yaml         | 1 -
 .../configWithReadwriteSplittingDataSourceWithoutProps.yaml      | 1 -
 .../src/test/resources/yaml/readwrite-splitting-rule.yaml        | 1 -
 .../rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java      | 1 -
 .../src/main/resources/conf/config-readwrite-splitting.yaml      | 3 ---
 .../proxy/config/ProxyConfigurationLoaderTest.java               | 1 -
 .../src/test/resources/conf/config-readwrite-splitting.yaml      | 1 -
 .../proxy/conf/config-readwrite-splitting.yaml                   | 1 -
 .../src/test/resources/env/readwrite_splitting/rules.yaml        | 1 -
 33 files changed, 16 insertions(+), 57 deletions(-)

diff --git a/docs/document/content/features/test-engine/performance-test-sysbench.cn.md b/docs/document/content/features/test-engine/performance-test-sysbench.cn.md
index c3e6b63..684d349 100644
--- a/docs/document/content/features/test-engine/performance-test-sysbench.cn.md
+++ b/docs/document/content/features/test-engine/performance-test-sysbench.cn.md
@@ -520,10 +520,9 @@ dataSources:
     maintenanceIntervalMilliseconds: 30000
 
 rules:
-- !REPLICA_QUERY
+- !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       primaryDataSourceName: ds_0
       replicaDataSourceNames:
         - ds_0
@@ -707,10 +706,9 @@ rules:
       props:
         worker-id: 123
 
-- !REPLICA_QUERY
+- !READWRITE_SPLITTING
   dataSources:
     ds_0:
-      name: ds_0
       primaryDataSourceName: primary_ds_0
       replicaDataSourceNames:
         - primary_ds_0
diff --git a/docs/document/content/features/test-engine/performance-test-sysbench.en.md b/docs/document/content/features/test-engine/performance-test-sysbench.en.md
index 0dcb8a3..5c4400b 100644
--- a/docs/document/content/features/test-engine/performance-test-sysbench.en.md
+++ b/docs/document/content/features/test-engine/performance-test-sysbench.en.md
@@ -520,10 +520,9 @@ dataSources:
     maintenanceIntervalMilliseconds: 30000
 
 rules:
-- !REPLICA_QUERY
+- !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       primaryDataSourceName: ds_0
       replicaDataSourceNames:
         - ds_0
@@ -707,10 +706,9 @@ rules:
       props:
         worker-id: 123
 
-- !REPLICA_QUERY
+- !READWRITE_SPLITTING
   dataSources:
     ds_0:
-      name: ds_0
       primaryDataSourceName: primary_ds_0
       replicaDataSourceNames:
         - primary_ds_0
diff --git a/docs/document/content/features/test-engine/performance-test.cn.md b/docs/document/content/features/test-engine/performance-test.cn.md
index 951c2a6..ddc9cb4 100644
--- a/docs/document/content/features/test-engine/performance-test.cn.md
+++ b/docs/document/content/features/test-engine/performance-test.cn.md
@@ -149,8 +149,7 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
-      writeyDataSourceName: primary_ds
+      writeDataSourceName: primary_ds
       readDataSourceNames:
         - replica_ds_0
 ```
diff --git a/docs/document/content/features/test-engine/performance-test.en.md b/docs/document/content/features/test-engine/performance-test.en.md
index f5c904b..84f7d4e 100644
--- a/docs/document/content/features/test-engine/performance-test.en.md
+++ b/docs/document/content/features/test-engine/performance-test.en.md
@@ -150,7 +150,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       writeDataSourceName: primary_ds
       readDataSourceNames:
         - replica_ds_0
@@ -264,22 +263,22 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds_0:
-      writeyDataSourceName: primary_ds_0
+      writeDataSourceName: primary_ds_0
       readDataSourceNames:
         - replica_ds_0
       loadBalancerName: round_robin
     pr_ds_1:
-      writeyDataSourceName: primary_ds_1
+      writeDataSourceName: primary_ds_1
       readDataSourceNames:
         - replica_ds_1
       loadBalancerName: round_robin
     pr_ds_2:
-      writeyDataSourceName: primary_ds_2
+      writeDataSourceName: primary_ds_2
       readDataSourceNames:
         - replica_ds_2
       loadBalancerName: round_robin
     pr_ds_3:
-      writeyDataSourceName: primary_ds_3
+      writeDataSourceName: primary_ds_3
       readDataSourceNames:
         - replica_ds_3
       loadBalancerName: round_robin
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
index 38bcb8a..775c9b6 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
@@ -16,7 +16,7 @@ dataSources: # 配置真实存在的数据源作为名称
     # ...省略具体配置
   read_ds_0:
     # ...省略具体配置
-  read_ds_0:
+  read_ds_1:
     # ...省略具体配置
 
 rules:
@@ -50,8 +50,7 @@ rules:
   
   - !READWRITE_SPLITTING # 配置读写分离规则
     dataSources:
-      ds:
-        name: ds # 读写分离的逻辑数据源名称 `ds` 用于在数据分片中使用
+      ds: # 读写分离的逻辑数据源名称 `ds` 用于在数据分片中使用
         writeDataSourceName: write_ds # 使用真实存在的数据源名称 `write_ds`
         readDataSourceNames:
           - read_ds_0 # 使用真实存在的数据源名称 `read_ds_0`
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
index 9993e5d..c392bcf 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
@@ -17,7 +17,7 @@ dataSources: # Configure the real data source name.
     # ...Omit specific configuration.
   read_ds_0:
     # ...Omit specific configuration.
-  read_ds_0:
+  read_ds_1:
     # ...Omit specific configuration.
 
 rules:
@@ -51,8 +51,7 @@ rules:
   
   - !READWRITE_SPLITTING # Configure readwrite-splitting rules.
     dataSources:
-      ds:
-        name: ds # The logical data source name 'ds' for readwrite-splitting is used in data sharding.
+      ds: # The logical data source name 'ds' for readwrite-splitting is used in data sharding.
         writeDataSourceName: write_ds # Use the real data source name 'write_ds'.
         readDataSourceNames:
           - read_ds_0 # Use the real data source name 'read_ds_0'.
diff --git a/examples/shardingsphere-jdbc-example/governance-example/governance-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/governance-example/governance-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/readwrite-splitting.yaml
index c62ada0..9ff1ba2 100644
--- a/examples/shardingsphere-jdbc-example/governance-example/governance-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/readwrite-splitting.yaml
+++ b/examples/shardingsphere-jdbc-example/governance-example/governance-raw-jdbc-example/src/main/resources/META-INF/zookeeper/local/readwrite-splitting.yaml
@@ -46,7 +46,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       writeDataSourceName: write_ds
       readDataSourceNames: [read_ds_0, read_ds_1]
 
diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/hint-example/hint-raw-jdbc-example/src/main/resources/META-INF/hint-write-only.yaml b/examples/shardingsphere-jdbc-example/other-feature-example/hint-example/hint-raw-jdbc-example/src/main/resources/META-INF/hint-write-only.yaml
index 5755237..a5f9a5f 100644
--- a/examples/shardingsphere-jdbc-example/other-feature-example/hint-example/hint-raw-jdbc-example/src/main/resources/META-INF/hint-write-only.yaml
+++ b/examples/shardingsphere-jdbc-example/other-feature-example/hint-example/hint-raw-jdbc-example/src/main/resources/META-INF/hint-write-only.yaml
@@ -39,7 +39,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       writeDataSourceName: write_ds
       readDataSourceNames: [read_ds_0, read_ds_1]
 
diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/resources/META-INF/readwrite-splitting-shadow-databases.yaml b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/resources/META-INF/readwrite-splitting-shadow-databases.yaml
index 4c0aa1c..8a89047 100644
--- a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/resources/META-INF/readwrite-splitting-shadow-databases.yaml
+++ b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/resources/META-INF/readwrite-splitting-shadow-databases.yaml
@@ -54,7 +54,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       writeDataSourceName: write_ds
       readDataSourceNames: [read_ds]
 
diff --git a/examples/shardingsphere-jdbc-example/sharding-example/sharding-raw-jdbc-example/src/main/resources/META-INF/readwrite-splitting.yaml b/examples/shardingsphere-jdbc-example/sharding-example/sharding-raw-jdbc-example/src/main/resources/META-INF/readwrite-splitting.yaml
index 1205a6e..e1c9517 100644
--- a/examples/shardingsphere-jdbc-example/sharding-example/sharding-raw-jdbc-example/src/main/resources/META-INF/readwrite-splitting.yaml
+++ b/examples/shardingsphere-jdbc-example/sharding-example/sharding-raw-jdbc-example/src/main/resources/META-INF/readwrite-splitting.yaml
@@ -39,7 +39,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       writeDataSourceName: write_ds
       readDataSourceNames: [read_ds_0, read_ds_1]
 
diff --git a/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/config-readwrite-splitting.yaml b/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/config-readwrite-splitting.yaml
index a44e1ec..9e03f0a 100644
--- a/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/config-readwrite-splitting.yaml
+++ b/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/config-readwrite-splitting.yaml
@@ -25,8 +25,8 @@
 schemaName: readwrite-splitting_db
 
 dataSources:
-  writey_ds:
-    url: jdbc:mysql://127.0.0.1:3306/writey_ds?serverTimezone=UTC&useSSL=false
+  write_ds:
+    url: jdbc:mysql://127.0.0.1:3306/write_ds?serverTimezone=UTC&useSSL=false
     username: root
     password:
     connectionTimeoutMilliseconds: 30000
@@ -60,8 +60,7 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
-      writeyDataSourceName: writey_ds
+      writeDataSourceName: write_ds
       readDataSourceNames:
         - read_ds_0
         - read_ds_1
diff --git a/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/config-write-only.yaml b/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/config-write-only.yaml
index fbe4d10..39f0e08 100644
--- a/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/config-write-only.yaml
+++ b/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/config-write-only.yaml
@@ -53,7 +53,6 @@ rules:
 - !read_QUERY
   dataSources:
     pr_ds:
-      name: pr_ds
       writeDataSourceName: write_ds
       readDataSourceNames:
         - read_ds_0
diff --git a/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/config-readwrite-splitting.yaml b/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/config-readwrite-splitting.yaml
index a2b6c36..85c96a8 100644
--- a/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/config-readwrite-splitting.yaml
+++ b/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/config-readwrite-splitting.yaml
@@ -60,7 +60,6 @@
 #- !READWRITE_SPLITTING
 #  dataSources:
 #    pr_ds:
-#      name: pr_ds
 #      writeDataSourceName: primary_ds
 #      readDataSourceNames:
 #        - replica_ds_0
@@ -110,7 +109,6 @@
 #- !READWRITE_SPLITTING
 #  dataSources:
 #    pr_ds:
-#      name: pr_ds
 #      writeDataSourceName: write_ds
 #      readDataSourceNames:
 #        - read_ds_0
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/config/rule/YamlReadwriteSplittingDataSourceRuleConfiguration.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/config/rule/YamlReadwriteSplittingDataSourceRuleConfiguration.java
index f9766b7..cb1b00c 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/config/rule/YamlReadwriteSplittingDataSourceRuleConfiguration.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/config/rule/YamlReadwriteSplittingDataSourceRuleConfiguration.java
@@ -32,8 +32,6 @@ import java.util.Properties;
 @Setter
 public final class YamlReadwriteSplittingDataSourceRuleConfiguration implements YamlConfiguration {
     
-    private String name;
-    
     private String autoAwareDataSourceName;
     
     private String writeDataSourceName;
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/converter/AlterReadwriteSplittingRuleStatementConverter.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/converter/AlterReadwriteSplittingRuleStatementConverter.java
index d450527..af58fbf 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/converter/AlterReadwriteSplittingRuleStatementConverter.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/converter/AlterReadwriteSplittingRuleStatementConverter.java
@@ -42,7 +42,6 @@ public final class AlterReadwriteSplittingRuleStatementConverter {
         YamlReadwriteSplittingRuleConfiguration result = new YamlReadwriteSplittingRuleConfiguration();
         for (ReadwriteSplittingRuleSegment each : rules) {
             YamlReadwriteSplittingDataSourceRuleConfiguration dataSourceRuleConfiguration = new YamlReadwriteSplittingDataSourceRuleConfiguration();
-            dataSourceRuleConfiguration.setName(each.getName());
             dataSourceRuleConfiguration.setWriteDataSourceName(each.getWriteDataSource());
             dataSourceRuleConfiguration.getReadDataSourceNames().addAll(each.getReadDataSources());
             dataSourceRuleConfiguration.setLoadBalancerName(each.getLoadBalancer());
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/converter/CreateReadwriteSplittingRuleStatementConverter.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/converter/CreateReadwriteSplittingRuleStatementConverter.java
index ed70e9e..c9589b9 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/converter/CreateReadwriteSplittingRuleStatementConverter.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/converter/CreateReadwriteSplittingRuleStatementConverter.java
@@ -41,7 +41,6 @@ public final class CreateReadwriteSplittingRuleStatementConverter {
         YamlReadwriteSplittingRuleConfiguration result = new YamlReadwriteSplittingRuleConfiguration();
         for (ReadwriteSplittingRuleSegment each : sqlStatement.getReadwriteSplittingRules()) {
             YamlReadwriteSplittingDataSourceRuleConfiguration dataSourceRuleConfiguration = new YamlReadwriteSplittingDataSourceRuleConfiguration();
-            dataSourceRuleConfiguration.setName(each.getName());
             dataSourceRuleConfiguration.setWriteDataSourceName(each.getWriteDataSource());
             dataSourceRuleConfiguration.getReadDataSourceNames().addAll(each.getReadDataSources());
             dataSourceRuleConfiguration.setLoadBalancerName(each.getLoadBalancer());
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurat [...]
index 394fbb9..0f04abc 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapper.java
@@ -50,7 +50,6 @@ public final class ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapp
     
     private YamlReadwriteSplittingDataSourceRuleConfiguration swapToYamlConfiguration(final ReadwriteSplittingDataSourceRuleConfiguration dataSourceRuleConfig) {
         YamlReadwriteSplittingDataSourceRuleConfiguration result = new YamlReadwriteSplittingDataSourceRuleConfiguration();
-        result.setName(dataSourceRuleConfig.getName());
         result.setAutoAwareDataSourceName(dataSourceRuleConfig.getAutoAwareDataSourceName());
         result.setWriteDataSourceName(dataSourceRuleConfig.getWriteDataSourceName());
         result.setReadDataSourceNames(dataSourceRuleConfig.getReadDataSourceNames());
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleConfigurationYamlSwapper.java
index 509d2cd..27de6ab 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/main/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleConfigurationYamlSwapper.java
@@ -54,7 +54,6 @@ public final class ReadwriteSplittingRuleConfigurationYamlSwapper
     
     private YamlReadwriteSplittingDataSourceRuleConfiguration swapToYamlConfiguration(final ReadwriteSplittingDataSourceRuleConfiguration dataSourceRuleConfig) {
         YamlReadwriteSplittingDataSourceRuleConfiguration result = new YamlReadwriteSplittingDataSourceRuleConfiguration();
-        result.setName(dataSourceRuleConfig.getName());
         result.setAutoAwareDataSourceName(dataSourceRuleConfig.getAutoAwareDataSourceName());
         result.setWriteDataSourceName(dataSourceRuleConfig.getWriteDataSourceName());
         result.setReadDataSourceNames(dataSourceRuleConfig.getReadDataSourceNames());
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/test/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/test/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleAlgorithmProviderConfig [...]
index e10381e..ac47d06 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/test/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/test/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapperTest.java
@@ -43,7 +43,6 @@ public final class ReadwriteSplittingRuleAlgorithmProviderConfigurationYamlSwapp
         assertNotNull(actual);
         assertNotNull(actual.getDataSources());
         assertThat(actual.getDataSources().keySet(), is(Collections.singleton("name")));
-        assertThat(actual.getDataSources().get("name").getName(), is("name"));
         assertThat(actual.getDataSources().get("name").getWriteDataSourceName(), is("writeDataSourceName"));
         assertThat(actual.getDataSources().get("name").getLoadBalancerName(), is("loadBalancerName"));
         assertThat(actual.getDataSources().get("name").getReadDataSourceNames(), is(Collections.singletonList("readDataSourceName")));
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/test/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/test/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleConfigurationYamlSwapperTest.java
index 1ec125a..85fabd5 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/test/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-common/src/test/java/org/apache/shardingsphere/readwritesplitting/common/yaml/swapper/ReadwriteSplittingRuleConfigurationYamlSwapperTest.java
@@ -53,7 +53,6 @@ public final class ReadwriteSplittingRuleConfigurationYamlSwapperTest {
                 new ReadwriteSplittingDataSourceRuleConfiguration("ds", "", "write", Collections.singletonList("read"), "roundRobin");
         YamlReadwriteSplittingRuleConfiguration actual = getReadwriteSplittingRuleConfigurationYamlSwapper().swapToYamlConfiguration(new ReadwriteSplittingRuleConfiguration(
                 Collections.singleton(dataSourceConfig), ImmutableMap.of("roundRobin", new ShardingSphereAlgorithmConfiguration("ROUND_ROBIN", new Properties()))));
-        assertThat(actual.getDataSources().get("ds").getName(), is("ds"));
         assertThat(actual.getDataSources().get("ds").getWriteDataSourceName(), is("write"));
         assertThat(actual.getDataSources().get("ds").getReadDataSourceNames(), is(Collections.singletonList("read")));
         assertThat(actual.getDataSources().get("ds").getLoadBalancerName(), is("roundRobin"));
@@ -64,7 +63,6 @@ public final class ReadwriteSplittingRuleConfigurationYamlSwapperTest {
         ReadwriteSplittingDataSourceRuleConfiguration dataSourceConfig = new ReadwriteSplittingDataSourceRuleConfiguration("ds", "", "write", Collections.singletonList("read"), null);
         YamlReadwriteSplittingRuleConfiguration actual = getReadwriteSplittingRuleConfigurationYamlSwapper().swapToYamlConfiguration(
                 new ReadwriteSplittingRuleConfiguration(Collections.singleton(dataSourceConfig), Collections.emptyMap()));
-        assertThat(actual.getDataSources().get("ds").getName(), is("ds"));
         assertThat(actual.getDataSources().get("ds").getWriteDataSourceName(), is("write"));
         assertThat(actual.getDataSources().get("ds").getReadDataSourceNames(), is(Collections.singletonList("read")));
         assertNull(actual.getDataSources().get("ds").getLoadBalancerName());
@@ -90,7 +88,6 @@ public final class ReadwriteSplittingRuleConfigurationYamlSwapperTest {
     private YamlReadwriteSplittingRuleConfiguration createYamlReadwriteSplittingRuleConfiguration() {
         YamlReadwriteSplittingRuleConfiguration result = new YamlReadwriteSplittingRuleConfiguration();
         result.getDataSources().put("read_query_ds", new YamlReadwriteSplittingDataSourceRuleConfiguration());
-        result.getDataSources().get("read_query_ds").setName("read_query_ds");
         result.getDataSources().get("read_query_ds").setWriteDataSourceName("write_ds");
         result.getDataSources().get("read_query_ds").setReadDataSourceNames(Arrays.asList("read_ds_0", "read_ds_1"));
         return result;
diff --git a/shardingsphere-governance/shardingsphere-governance-core/src/test/resources/yaml/readwrite-splitting-rule.yaml b/shardingsphere-governance/shardingsphere-governance-core/src/test/resources/yaml/readwrite-splitting-rule.yaml
index a6e96fc..0f40706 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/src/test/resources/yaml/readwrite-splitting-rule.yaml
+++ b/shardingsphere-governance/shardingsphere-governance-core/src/test/resources/yaml/readwrite-splitting-rule.yaml
@@ -20,7 +20,6 @@ rules:
   dataSources:
     pr_ds:
       writeDataSourceName: write_ds
-      name: pr_ds
       readDataSourceNames:
         - read_ds_0
         - read_ds_1
diff --git a/shardingsphere-governance/shardingsphere-governance-core/src/test/resources/yaml/registryCenter/data-readwrite-splitting-rule.yaml b/shardingsphere-governance/shardingsphere-governance-core/src/test/resources/yaml/registryCenter/data-readwrite-splitting-rule.yaml
index a6e96fc..0f40706 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/src/test/resources/yaml/registryCenter/data-readwrite-splitting-rule.yaml
+++ b/shardingsphere-governance/shardingsphere-governance-core/src/test/resources/yaml/registryCenter/data-readwrite-splitting-rule.yaml
@@ -20,7 +20,6 @@ rules:
   dataSources:
     pr_ds:
       writeDataSourceName: write_ds
-      name: pr_ds
       readDataSourceNames:
         - read_ds_0
         - read_ds_1
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-calcite.yaml b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-calcite.yaml
index ef66db0..df5e088 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-calcite.yaml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-calcite.yaml
@@ -73,7 +73,6 @@ rules:
   - !READWRITE_SPLITTING
     dataSources:
       calcite_ds:
-        name: calcite_ds
         writeDataSourceName:
           - calcite_jdbc_1
         readDataSourceNames:
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-readwrite-splitting.yaml b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-readwrite-splitting.yaml
index 3a88167..4366a64 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-readwrite-splitting.yaml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-readwrite-splitting.yaml
@@ -19,7 +19,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     test_ds:
-      name: test_ds
       writeDataSourceName: test_write_ds
       readDataSourceNames:
         - test_replica_ds
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml
index 85cb970..f47c464 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml
@@ -42,7 +42,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       writeDataSourceName: db_write
       readDataSourceNames:
         - read_ds_0
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml
index fd829c2..e721a17 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml
@@ -42,7 +42,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds:
-      name: pr_ds
       writeDataSourceName: db_write
       readDataSourceNames:
         - read_ds_0
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/readwrite-splitting-rule.yaml b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/readwrite-splitting-rule.yaml
index 986c811..46074ad 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/readwrite-splitting-rule.yaml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-governance-spring/shardingsphere-jdbc-governance-spring-boot-starter/src/test/resources/yaml/readwrite-splitting-rule.yaml
@@ -22,7 +22,6 @@ rules:
       type: ROUND_ROBIN
   dataSources:
     pr_ds:
-      name: pr_ds
       loadBalancerName: roundRobin
       writeDataSourceName: write_ds
       readDataSourceNames:
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java
index 4e59c37..3692b2e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java
@@ -120,7 +120,6 @@ public final class AlterReadwriteSplittingRuleBackendHandler extends SchemaRequi
             YamlReadwriteSplittingDataSourceRuleConfiguration alterConfig = result.getDataSources().get(each.getName());
             if (null == alterConfig) {
                 YamlReadwriteSplittingDataSourceRuleConfiguration existConfig = new YamlReadwriteSplittingDataSourceRuleConfiguration();
-                existConfig.setName(each.getName());
                 existConfig.setWriteDataSourceName(each.getWriteDataSourceName());
                 existConfig.setReadDataSourceNames(each.getReadDataSourceNames());
                 existConfig.setLoadBalancerName(each.getLoadBalancerName());
diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/config-readwrite-splitting.yaml b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/config-readwrite-splitting.yaml
index ab78127..d737701 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/config-readwrite-splitting.yaml
+++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/config-readwrite-splitting.yaml
@@ -60,7 +60,6 @@
 #- !READWRITE_SPLITTING
 #  dataSources:
 #    pr_ds:
-#      name: pr_ds
 #      writeDataSourceName: primary_ds
 #      readDataSourceNames:
 #        - replica_ds_0
@@ -109,8 +108,6 @@
 #rules:
 #- !READWRITE_SPLITTING
 #  dataSources:
-#    pr_ds:
-#      name: pr_ds
 #      writeDataSourceName: write_ds
 #      readDataSourceNames:
 #        - read_ds_0
diff --git a/shardingsphere-proxy/shardingsphere-proxy-common/src/test/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoaderTest.java b/shardingsphere-proxy/shardingsphere-proxy-common/src/test/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoaderTest.java
index 3733275..fe2af43 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-common/src/test/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoaderTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-common/src/test/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoaderTest.java
@@ -93,7 +93,6 @@ public final class ProxyConfigurationLoaderTest {
     }
     
     private void assertReadwriteSplittingRuleConfiguration(final YamlReadwriteSplittingDataSourceRuleConfiguration actual) {
-        assertThat(actual.getName(), is("pr_ds"));
         assertThat(actual.getWriteDataSourceName(), is("write_ds"));
         assertThat(actual.getReadDataSourceNames().size(), is(2));
         Iterator<String> replicaDataSourceNames = actual.getReadDataSourceNames().iterator();
diff --git a/shardingsphere-proxy/shardingsphere-proxy-common/src/test/resources/conf/config-readwrite-splitting.yaml b/shardingsphere-proxy/shardingsphere-proxy-common/src/test/resources/conf/config-readwrite-splitting.yaml
index 104cc59..4c94e99 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-common/src/test/resources/conf/config-readwrite-splitting.yaml
+++ b/shardingsphere-proxy/shardingsphere-proxy-common/src/test/resources/conf/config-readwrite-splitting.yaml
@@ -53,7 +53,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     pr_ds: 
-      name: pr_ds
       writeDataSourceName: write_ds
       readDataSourceNames:
         - read_ds_0
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/readwrite_splitting/proxy/conf/config-readwrite-splitting.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/readwrite_splitting/proxy/conf/config-readwrite-splitting.yaml
index 97fc0ac..fc64850 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/readwrite_splitting/proxy/conf/config-readwrite-splitting.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/docker/readwrite_splitting/proxy/conf/config-readwrite-splitting.yaml
@@ -79,7 +79,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     write-read-ds:
-      name: write-read-ds
       writeDataSourceName: write_ds
       readDataSourceNames:
         - read_0
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/readwrite_splitting/rules.yaml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/readwrite_splitting/rules.yaml
index c00911a..7568ca8 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/readwrite_splitting/rules.yaml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/readwrite_splitting/rules.yaml
@@ -45,7 +45,6 @@ rules:
 - !READWRITE_SPLITTING
   dataSources:
     write-read-ds: 
-      name: write-read-ds
       writeDataSourceName: write_ds
       readDataSourceNames: 
         - read_0