This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 96b424e7676 Use dataSourceGroups to instead of dataSources in yaml
configuration (#31017)
96b424e7676 is described below
commit 96b424e7676e76a15b3a6e0158e433239325b1c3
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Apr 26 00:28:36 2024 +0800
Use dataSourceGroups to instead of dataSources in yaml configuration
(#31017)
* Use dataSourceGroups to instead of dataSources in yaml configuration
* Use dataSourceGroups to instead of dataSources in yaml configuration
---
...h_Availability_with_Apache_ShardingSphere.en.md | 2 +-
...0_The_Ideal_Database_Management_Ecosystem.en.md | 4 ++--
.../Nov_23_1_Integrate_SCTL_into_RAL.en.md | 2 +-
docs/document/content/faq/_index.cn.md | 2 +-
docs/document/content/faq/_index.en.md | 2 +-
.../builtin-algorithm/load-balance.cn.md | 2 +-
.../builtin-algorithm/load-balance.en.md | 2 +-
.../graalvm-native-image/_index.cn.md | 2 +-
.../graalvm-native-image/_index.en.md | 2 +-
.../yaml-config/rules/readwrite-splitting.cn.md | 4 ++--
.../yaml-config/rules/readwrite-splitting.en.md | 6 +++---
.../resources/yaml/feature/readwrite-splitting.ftl | 2 +-
...adwriteSplittingDataSourceChangedProcessor.java | 14 +++++++-------
.../YamlReadwriteSplittingRuleConfiguration.java | 4 ++--
...SplittingDataSourceGroupRuleConfiguration.java} | 4 ++--
...eSplittingDataNodeRuleConfigurationSwapper.java | 16 ++++++++--------
...ReadwriteSplittingRuleConfigurationSwapper.java | 22 +++++++++++-----------
.../ReadwriteSplittingRuleConfigurationYamlIT.java | 16 ++++++++--------
...writeSplittingRuleConfigurationSwapperTest.java | 20 ++++++++++----------
.../resources/yaml/readwrite-splitting-rule.yaml | 2 +-
.../config/ProxyConfigurationLoaderTest.java | 6 +++---
.../database-readwrite-splitting.yaml | 2 +-
.../test/resources/conf/convert/database-mix.yaml | 2 +-
.../conf/convert/database-readwrite-splitting.yaml | 2 +-
.../conf/import/database-readwrite-splitting.yaml | 2 +-
.../conf/swap/database-readwrite-splitting.yaml | 2 +-
.../conf/database-readwrite-splitting.yaml | 4 ++--
.../config/database-readwrite-splitting.yaml | 2 +-
.../mysql/database-readwrite-splitting-local.yaml | 2 +-
.../database-readwrite-splitting-xa-atomikos.yaml | 2 +-
.../database-readwrite-splitting-xa-narayana.yaml | 2 +-
.../conf/mysql/database-readwrite-splitting.yaml | 2 +-
.../opengauss/database-readwrite-splitting.yaml | 2 +-
.../postgresql/database-readwrite-splitting.yaml | 2 +-
.../database-dbtbl-with-readwrite-splitting.yaml | 2 +-
.../database-dbtbl-with-readwrite-splitting.yaml | 2 +-
.../database-dbtbl-with-readwrite-splitting.yaml | 2 +-
.../dbtbl_with_readwrite_splitting/rules.yaml | 2 +-
...dbtbl-with-readwrite-splitting-and-encrypt.yaml | 2 +-
...dbtbl-with-readwrite-splitting-and-encrypt.yaml | 2 +-
...dbtbl-with-readwrite-splitting-and-encrypt.yaml | 2 +-
.../rules.yaml | 2 +-
.../proxy/conf/mysql/database-empty-rules.yaml | 2 +-
.../proxy/conf/opengauss/database-empty-rules.yaml | 2 +-
.../conf/postgresql/database-empty-rules.yaml | 2 +-
.../database-encrypt-readwrite-splitting.yaml | 2 +-
.../database-encrypt-readwrite-splitting.yaml | 2 +-
.../database-encrypt-readwrite-splitting.yaml | 2 +-
.../encrypt_and_readwrite_splitting/rules.yaml | 2 +-
.../conf/mysql/database-readwrite-splitting.yaml | 2 +-
.../opengauss/database-readwrite-splitting.yaml | 2 +-
.../postgresql/database-readwrite-splitting.yaml | 2 +-
.../env/scenario/readwrite_splitting/rules.yaml | 2 +-
.../proxy/conf/mysql/database-shadow.yaml | 2 +-
.../proxy/conf/opengauss/database-shadow.yaml | 2 +-
.../proxy/conf/postgresql/database-shadow.yaml | 2 +-
.../readwrite_splitting_and_shadow/rules.yaml | 2 +-
.../yaml/features/readwrite-splitting.yaml | 2 +-
58 files changed, 106 insertions(+), 106 deletions(-)
diff --git
a/docs/blog/content/material/2022_03_16_Create_a_Distributed_Database_with_High_Availability_with_Apache_ShardingSphere.en.md
b/docs/blog/content/material/2022_03_16_Create_a_Distributed_Database_with_High_Availability_with_Apache_ShardingSphere.en.md
index 382f92818d1..2dae7f6591b 100644
---
a/docs/blog/content/material/2022_03_16_Create_a_Distributed_Database_with_High_Availability_with_Apache_ShardingSphere.en.md
+++
b/docs/blog/content/material/2022_03_16_Create_a_Distributed_Database_with_High_Availability_with_Apache_ShardingSphere.en.md
@@ -69,7 +69,7 @@ dataSources:
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
replication_ds:
type: Dynamic
props:
diff --git
a/docs/blog/content/material/Jan_28_Blog_X_Kernel_Optimizations_&_Upgrade_Guide_for_Apache_ShardingSphere_5.0.0_The_Ideal_Database_Management_Ecosystem.en.md
b/docs/blog/content/material/Jan_28_Blog_X_Kernel_Optimizations_&_Upgrade_Guide_for_Apache_ShardingSphere_5.0.0_The_Ideal_Database_Management_Ecosystem.en.md
index a7823666af6..28e5d1b8b63 100644
---
a/docs/blog/content/material/Jan_28_Blog_X_Kernel_Optimizations_&_Upgrade_Guide_for_Apache_ShardingSphere_5.0.0_The_Ideal_Database_Management_Ecosystem.en.md
+++
b/docs/blog/content/material/Jan_28_Blog_X_Kernel_Optimizations_&_Upgrade_Guide_for_Apache_ShardingSphere_5.0.0_The_Ideal_Database_Management_Ecosystem.en.md
@@ -291,7 +291,7 @@ masterSlaveRule:
# 5.0.0 GA Read/Write Splitting API
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
pr_ds:
writeDataSourceName: write_ds
readDataSourceNames:
@@ -564,7 +564,7 @@ rules:
algorithm-expression: t_order_item_${order_id % 2}
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
ms_ds_0:
writeDataSourceName: ds_0
readDataSourceNames:
diff --git a/docs/blog/content/material/Nov_23_1_Integrate_SCTL_into_RAL.en.md
b/docs/blog/content/material/Nov_23_1_Integrate_SCTL_into_RAL.en.md
index 61cddfbb097..8553264ea08 100644
--- a/docs/blog/content/material/Nov_23_1_Integrate_SCTL_into_RAL.en.md
+++ b/docs/blog/content/material/Nov_23_1_Integrate_SCTL_into_RAL.en.md
@@ -135,7 +135,7 @@ Output
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git a/docs/document/content/faq/_index.cn.md
b/docs/document/content/faq/_index.cn.md
index f3b87df7528..b2d43bbd7b4 100644
--- a/docs/document/content/faq/_index.cn.md
+++ b/docs/document/content/faq/_index.cn.md
@@ -195,7 +195,7 @@ rules:
tables:
- "*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git a/docs/document/content/faq/_index.en.md
b/docs/document/content/faq/_index.en.md
index a57c8215ea0..13a7ee56c31 100644
--- a/docs/document/content/faq/_index.en.md
+++ b/docs/document/content/faq/_index.en.md
@@ -198,7 +198,7 @@ rules:
tables:
- "*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/docs/document/content/user-manual/common-config/builtin-algorithm/load-balance.cn.md
b/docs/document/content/user-manual/common-config/builtin-algorithm/load-balance.cn.md
index fb6a91d6b65..6e4e9218dd6 100644
---
a/docs/document/content/user-manual/common-config/builtin-algorithm/load-balance.cn.md
+++
b/docs/document/content/user-manual/common-config/builtin-algorithm/load-balance.cn.md
@@ -36,7 +36,7 @@ ShardingSphere 内置提供了多种负载均衡算法,具体包括了轮询
```yaml
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/docs/document/content/user-manual/common-config/builtin-algorithm/load-balance.en.md
b/docs/document/content/user-manual/common-config/builtin-algorithm/load-balance.en.md
index eade20d8d5a..58a4987632c 100644
---
a/docs/document/content/user-manual/common-config/builtin-algorithm/load-balance.en.md
+++
b/docs/document/content/user-manual/common-config/builtin-algorithm/load-balance.en.md
@@ -38,7 +38,7 @@ Attributes:
```yaml
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
index 7760856a569..b4b3b0bc282 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
@@ -192,7 +192,7 @@ Image 下使用。
```yaml
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
<LITERAL>readwrite_ds:
writeDataSourceName: <LITERAL>ds_0
readDataSourceNames:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
index 8b6d9ce320f..53a25870be0 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
@@ -200,7 +200,7 @@ One possible configuration is to use the `Row Value
Expressions` SPI implementat
```yaml
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
<LITERAL>readwrite_ds:
writeDataSourceName: <LITERAL>ds_0
readDataSourceNames:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting.cn.md
index da9530ce52e..298f096b148 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting.cn.md
@@ -14,7 +14,7 @@ weight = 3
```yaml
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
<data_source_name> (+): # 读写分离逻辑数据源名称,默认使用 Groovy 的行表达式 SPI 实现来解析
write_data_source_name: # 写库数据源名称,默认使用 Groovy 的行表达式 SPI 实现来解析
read_data_source_names: # 读库数据源名称,多个从数据源用逗号分隔,默认使用 Groovy 的行表达式 SPI
实现来解析
@@ -40,7 +40,7 @@ rules:
```yaml
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting.en.md
index 9f353992a56..c4ad4c8ba8f 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting.en.md
@@ -13,8 +13,8 @@ Read/write splitting YAML configuration is highly readable.
The YAML format enab
```yaml
rules:
- !READWRITE_SPLITTING
- dataSources:
- <data_source_name> (+): # Logic data source name of readwrite-splitting,
which uses Groovy's Row Value Expressions SPI implementation to parse by default
+ dataSourceGroups:
+ <data_source_group_name> (+): # Logic data source group name of
readwrite-splitting, which uses Groovy's Row Value Expressions SPI
implementation to parse by default
write_data_source_name: # Write data source name, which uses Groovy's
Row Value Expressions SPI implementation to parse by default
read_data_source_names: # Read data source names, multiple data source
names separated with comma, which uses Groovy's Row Value Expressions SPI
implementation to parse by default
transactionalReadQueryStrategy (?): # Routing strategy for read query
within a transaction, values include: PRIMARY (to primary), FIXED (to fixed
data source), DYNAMIC (to any data source), default value: DYNAMIC
@@ -39,7 +39,7 @@ Please refer to [Built-in Load Balance Algorithm
List](/en/user-manual/common-co
```yaml
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/resources/yaml/feature/readwrite-splitting.ftl
b/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/resources/yaml/feature/readwrite-splitting.ftl
index 77eee2a55dc..ee5bacf86be 100644
---
a/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/resources/yaml/feature/readwrite-splitting.ftl
+++
b/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/resources/yaml/feature/readwrite-splitting.ftl
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: ds_0
readDataSourceNames:
diff --git
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/changed/ReadwriteSplittingDataSourceChangedProcessor.java
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/changed/ReadwriteSplittingDataSourceChangedProcessor.java
index 9d0791a81bc..222dba3ad29 100644
---
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/changed/ReadwriteSplittingDataSourceChangedProcessor.java
+++
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/changed/ReadwriteSplittingDataSourceChangedProcessor.java
@@ -30,7 +30,7 @@ import
org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingD
import
org.apache.shardingsphere.readwritesplitting.api.transaction.TransactionalReadQueryStrategy;
import
org.apache.shardingsphere.readwritesplitting.metadata.nodepath.ReadwriteSplittingRuleNodePathProvider;
import
org.apache.shardingsphere.readwritesplitting.rule.ReadwriteSplittingRule;
-import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceRuleConfiguration;
+import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration;
import java.util.LinkedHashMap;
import java.util.LinkedList;
@@ -45,15 +45,15 @@ public final class
ReadwriteSplittingDataSourceChangedProcessor
@Override
public ReadwriteSplittingDataSourceGroupRuleConfiguration
swapRuleItemConfiguration(final AlterRuleItemEvent event, final String
yamlContent) {
- YamlReadwriteSplittingDataSourceRuleConfiguration
yamlDataSourceRuleConfig = YamlEngine.unmarshal(yamlContent,
YamlReadwriteSplittingDataSourceRuleConfiguration.class);
- return new
ReadwriteSplittingDataSourceGroupRuleConfiguration(((AlterNamedRuleItemEvent)
event).getItemName(), yamlDataSourceRuleConfig.getWriteDataSourceName(),
- yamlDataSourceRuleConfig.getReadDataSourceNames(),
getTransactionalReadQueryStrategy(yamlDataSourceRuleConfig),
yamlDataSourceRuleConfig.getLoadBalancerName());
+ YamlReadwriteSplittingDataSourceGroupRuleConfiguration
yamlDataSourceGroupRuleConfig = YamlEngine.unmarshal(yamlContent,
YamlReadwriteSplittingDataSourceGroupRuleConfiguration.class);
+ return new
ReadwriteSplittingDataSourceGroupRuleConfiguration(((AlterNamedRuleItemEvent)
event).getItemName(), yamlDataSourceGroupRuleConfig.getWriteDataSourceName(),
+ yamlDataSourceGroupRuleConfig.getReadDataSourceNames(),
getTransactionalReadQueryStrategy(yamlDataSourceGroupRuleConfig),
yamlDataSourceGroupRuleConfig.getLoadBalancerName());
}
- private TransactionalReadQueryStrategy
getTransactionalReadQueryStrategy(final
YamlReadwriteSplittingDataSourceRuleConfiguration yamlDataSourceRuleConfig) {
- return
Strings.isNullOrEmpty(yamlDataSourceRuleConfig.getTransactionalReadQueryStrategy())
+ private TransactionalReadQueryStrategy
getTransactionalReadQueryStrategy(final
YamlReadwriteSplittingDataSourceGroupRuleConfiguration
yamlDataSourceGroupRuleConfig) {
+ return
Strings.isNullOrEmpty(yamlDataSourceGroupRuleConfig.getTransactionalReadQueryStrategy())
? TransactionalReadQueryStrategy.DYNAMIC
- :
TransactionalReadQueryStrategy.valueOf(yamlDataSourceRuleConfig.getTransactionalReadQueryStrategy());
+ :
TransactionalReadQueryStrategy.valueOf(yamlDataSourceGroupRuleConfig.getTransactionalReadQueryStrategy());
}
@Override
diff --git
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/YamlReadwriteSplittingRuleConfiguration.java
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/YamlReadwriteSplittingRuleConfiguration.java
index 9231eebd808..6fb6ef9ab88 100644
---
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/YamlReadwriteSplittingRuleConfiguration.java
+++
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/YamlReadwriteSplittingRuleConfiguration.java
@@ -22,7 +22,7 @@ import lombok.Setter;
import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration;
import
org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration;
import
org.apache.shardingsphere.readwritesplitting.api.ReadwriteSplittingRuleConfiguration;
-import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceRuleConfiguration;
+import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -34,7 +34,7 @@ import java.util.Map;
@Setter
public final class YamlReadwriteSplittingRuleConfiguration implements
YamlRuleConfiguration {
- private Map<String, YamlReadwriteSplittingDataSourceRuleConfiguration>
dataSources = new LinkedHashMap<>();
+ private Map<String,
YamlReadwriteSplittingDataSourceGroupRuleConfiguration> dataSourceGroups = new
LinkedHashMap<>();
private Map<String, YamlAlgorithmConfiguration> loadBalancers = new
LinkedHashMap<>();
diff --git
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/rule/YamlReadwriteSplittingDataSourceRuleConfiguration.java
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/rule/YamlReadwriteSplittingDataSourceGroupRuleConfiguration.java
similarity index 87%
rename from
features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/rule/YamlReadwriteSplittingDataSourceRuleConfiguration.java
rename to
features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/rule/YamlReadwriteSplittingDataSourceGroupRuleConfiguration.java
index 07a4cb82a02..5c300d74604 100644
---
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/rule/YamlReadwriteSplittingDataSourceRuleConfiguration.java
+++
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/rule/YamlReadwriteSplittingDataSourceGroupRuleConfiguration.java
@@ -24,11 +24,11 @@ import
org.apache.shardingsphere.infra.util.yaml.YamlConfiguration;
import java.util.List;
/**
- * Readwrite-splitting data source rule configuration for YAML.
+ * Readwrite-splitting data source rule group configuration for YAML.
*/
@Getter
@Setter
-public final class YamlReadwriteSplittingDataSourceRuleConfiguration
implements YamlConfiguration {
+public final class YamlReadwriteSplittingDataSourceGroupRuleConfiguration
implements YamlConfiguration {
private String writeDataSourceName;
diff --git
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingDataNodeRuleConfigurationSwapper.java
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingDataNodeRuleConfigurationSwapper.java
index 2013676313a..e4e0110cd30 100644
---
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingDataNodeRuleConfigurationSwapper.java
+++
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingDataNodeRuleConfigurationSwapper.java
@@ -30,7 +30,7 @@ import
org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingD
import
org.apache.shardingsphere.readwritesplitting.api.transaction.TransactionalReadQueryStrategy;
import
org.apache.shardingsphere.readwritesplitting.constant.ReadwriteSplittingOrder;
import
org.apache.shardingsphere.readwritesplitting.metadata.nodepath.ReadwriteSplittingRuleNodePathProvider;
-import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceRuleConfiguration;
+import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration;
import java.util.Collection;
import java.util.LinkedHashMap;
@@ -64,8 +64,8 @@ public final class
YamlReadwriteSplittingDataNodeRuleConfigurationSwapper implem
return result;
}
- private YamlReadwriteSplittingDataSourceRuleConfiguration
swapToYamlConfiguration(final
ReadwriteSplittingDataSourceGroupRuleConfiguration dataSourceRuleGroupConfig) {
- YamlReadwriteSplittingDataSourceRuleConfiguration result = new
YamlReadwriteSplittingDataSourceRuleConfiguration();
+ private YamlReadwriteSplittingDataSourceGroupRuleConfiguration
swapToYamlConfiguration(final
ReadwriteSplittingDataSourceGroupRuleConfiguration dataSourceRuleGroupConfig) {
+ YamlReadwriteSplittingDataSourceGroupRuleConfiguration result = new
YamlReadwriteSplittingDataSourceGroupRuleConfiguration();
result.setWriteDataSourceName(dataSourceRuleGroupConfig.getWriteDataSourceName());
result.setReadDataSourceNames(dataSourceRuleGroupConfig.getReadDataSourceNames());
result.setTransactionalReadQueryStrategy(dataSourceRuleGroupConfig.getTransactionalReadQueryStrategy().name());
@@ -83,22 +83,22 @@ public final class
YamlReadwriteSplittingDataNodeRuleConfigurationSwapper implem
Map<String, AlgorithmConfiguration> loadBalancerMap = new
LinkedHashMap<>();
for (YamlDataNode each : validDataNodes) {
readwriteSplittingRuleNodePath.getNamedItem(ReadwriteSplittingRuleNodePathProvider.DATA_SOURCES).getName(each.getKey())
- .ifPresent(optional ->
dataSourceGroups.add(swapDataSourceGroup(optional,
YamlEngine.unmarshal(each.getValue(),
YamlReadwriteSplittingDataSourceRuleConfiguration.class))));
+ .ifPresent(optional ->
dataSourceGroups.add(swapDataSourceGroup(optional,
YamlEngine.unmarshal(each.getValue(),
YamlReadwriteSplittingDataSourceGroupRuleConfiguration.class))));
readwriteSplittingRuleNodePath.getNamedItem(ReadwriteSplittingRuleNodePathProvider.LOAD_BALANCERS).getName(each.getKey())
.ifPresent(optional -> loadBalancerMap.put(optional,
algorithmSwapper.swapToObject(YamlEngine.unmarshal(each.getValue(),
YamlAlgorithmConfiguration.class))));
}
return Optional.of(new
ReadwriteSplittingRuleConfiguration(dataSourceGroups, loadBalancerMap));
}
- private ReadwriteSplittingDataSourceGroupRuleConfiguration
swapDataSourceGroup(final String name, final
YamlReadwriteSplittingDataSourceRuleConfiguration yamlDataSourceRuleConfig) {
+ private ReadwriteSplittingDataSourceGroupRuleConfiguration
swapDataSourceGroup(final String name, final
YamlReadwriteSplittingDataSourceGroupRuleConfiguration
yamlDataSourceRuleConfig) {
return new ReadwriteSplittingDataSourceGroupRuleConfiguration(name,
yamlDataSourceRuleConfig.getWriteDataSourceName(),
yamlDataSourceRuleConfig.getReadDataSourceNames(),
getTransactionalReadQueryStrategy(yamlDataSourceRuleConfig),
yamlDataSourceRuleConfig.getLoadBalancerName());
}
- private TransactionalReadQueryStrategy
getTransactionalReadQueryStrategy(final
YamlReadwriteSplittingDataSourceRuleConfiguration yamlDataSourceRuleConfig) {
- return
Strings.isNullOrEmpty(yamlDataSourceRuleConfig.getTransactionalReadQueryStrategy())
+ private TransactionalReadQueryStrategy
getTransactionalReadQueryStrategy(final
YamlReadwriteSplittingDataSourceGroupRuleConfiguration
yamlDataSourceGroupRuleConfig) {
+ return
Strings.isNullOrEmpty(yamlDataSourceGroupRuleConfig.getTransactionalReadQueryStrategy())
? TransactionalReadQueryStrategy.DYNAMIC
- :
TransactionalReadQueryStrategy.valueOf(yamlDataSourceRuleConfig.getTransactionalReadQueryStrategy());
+ :
TransactionalReadQueryStrategy.valueOf(yamlDataSourceGroupRuleConfig.getTransactionalReadQueryStrategy());
}
@Override
diff --git
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingRuleConfigurationSwapper.java
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingRuleConfigurationSwapper.java
index d6b8d969c57..8826a6e4d24 100644
---
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingRuleConfigurationSwapper.java
+++
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingRuleConfigurationSwapper.java
@@ -26,7 +26,7 @@ import
org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingD
import
org.apache.shardingsphere.readwritesplitting.api.transaction.TransactionalReadQueryStrategy;
import
org.apache.shardingsphere.readwritesplitting.constant.ReadwriteSplittingOrder;
import
org.apache.shardingsphere.readwritesplitting.yaml.config.YamlReadwriteSplittingRuleConfiguration;
-import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceRuleConfiguration;
+import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration;
import java.util.Collection;
import java.util.Collections;
@@ -45,7 +45,7 @@ public final class
YamlReadwriteSplittingRuleConfigurationSwapper implements Yam
@Override
public YamlReadwriteSplittingRuleConfiguration
swapToYamlConfiguration(final ReadwriteSplittingRuleConfiguration data) {
YamlReadwriteSplittingRuleConfiguration result = new
YamlReadwriteSplittingRuleConfiguration();
- result.setDataSources(data.getDataSourceGroups().stream().collect(
+ result.setDataSourceGroups(data.getDataSourceGroups().stream().collect(
Collectors.toMap(ReadwriteSplittingDataSourceGroupRuleConfiguration::getName,
this::swapToYamlConfiguration, (oldValue, currentValue) -> oldValue,
LinkedHashMap::new)));
if (null != data.getLoadBalancers()) {
data.getLoadBalancers().forEach((key, value) ->
result.getLoadBalancers().put(key,
algorithmSwapper.swapToYamlConfiguration(value)));
@@ -53,8 +53,8 @@ public final class
YamlReadwriteSplittingRuleConfigurationSwapper implements Yam
return result;
}
- private YamlReadwriteSplittingDataSourceRuleConfiguration
swapToYamlConfiguration(final
ReadwriteSplittingDataSourceGroupRuleConfiguration dataSourceGroupRuleConfig) {
- YamlReadwriteSplittingDataSourceRuleConfiguration result = new
YamlReadwriteSplittingDataSourceRuleConfiguration();
+ private YamlReadwriteSplittingDataSourceGroupRuleConfiguration
swapToYamlConfiguration(final
ReadwriteSplittingDataSourceGroupRuleConfiguration dataSourceGroupRuleConfig) {
+ YamlReadwriteSplittingDataSourceGroupRuleConfiguration result = new
YamlReadwriteSplittingDataSourceGroupRuleConfiguration();
result.setWriteDataSourceName(dataSourceGroupRuleConfig.getWriteDataSourceName());
result.setReadDataSourceNames(dataSourceGroupRuleConfig.getReadDataSourceNames());
result.setTransactionalReadQueryStrategy(dataSourceGroupRuleConfig.getTransactionalReadQueryStrategy().name());
@@ -64,7 +64,7 @@ public final class
YamlReadwriteSplittingRuleConfigurationSwapper implements Yam
@Override
public ReadwriteSplittingRuleConfiguration swapToObject(final
YamlReadwriteSplittingRuleConfiguration yamlConfig) {
- Collection<ReadwriteSplittingDataSourceGroupRuleConfiguration>
dataSources = yamlConfig.getDataSources().entrySet().stream()
+ Collection<ReadwriteSplittingDataSourceGroupRuleConfiguration>
dataSources = yamlConfig.getDataSourceGroups().entrySet().stream()
.map(entry -> swapToObject(entry.getKey(),
entry.getValue())).collect(Collectors.toList());
Map<String, AlgorithmConfiguration> loadBalancerMap = null ==
yamlConfig.getLoadBalancers()
? Collections.emptyMap()
@@ -72,15 +72,15 @@ public final class
YamlReadwriteSplittingRuleConfigurationSwapper implements Yam
return new ReadwriteSplittingRuleConfiguration(dataSources,
loadBalancerMap);
}
- private ReadwriteSplittingDataSourceGroupRuleConfiguration
swapToObject(final String name, final
YamlReadwriteSplittingDataSourceRuleConfiguration yamlDataSourceRuleConfig) {
- return new ReadwriteSplittingDataSourceGroupRuleConfiguration(name,
yamlDataSourceRuleConfig.getWriteDataSourceName(),
yamlDataSourceRuleConfig.getReadDataSourceNames(),
- getTransactionalReadQueryStrategy(yamlDataSourceRuleConfig),
yamlDataSourceRuleConfig.getLoadBalancerName());
+ private ReadwriteSplittingDataSourceGroupRuleConfiguration
swapToObject(final String name, final
YamlReadwriteSplittingDataSourceGroupRuleConfiguration
yamlDataSourceGroupRuleConfig) {
+ return new ReadwriteSplittingDataSourceGroupRuleConfiguration(name,
yamlDataSourceGroupRuleConfig.getWriteDataSourceName(),
yamlDataSourceGroupRuleConfig.getReadDataSourceNames(),
+
getTransactionalReadQueryStrategy(yamlDataSourceGroupRuleConfig),
yamlDataSourceGroupRuleConfig.getLoadBalancerName());
}
- private TransactionalReadQueryStrategy
getTransactionalReadQueryStrategy(final
YamlReadwriteSplittingDataSourceRuleConfiguration yamlDataSourceRuleConfig) {
- return
Strings.isNullOrEmpty(yamlDataSourceRuleConfig.getTransactionalReadQueryStrategy())
+ private TransactionalReadQueryStrategy
getTransactionalReadQueryStrategy(final
YamlReadwriteSplittingDataSourceGroupRuleConfiguration
yamlDataSourceGroupRuleConfig) {
+ return
Strings.isNullOrEmpty(yamlDataSourceGroupRuleConfig.getTransactionalReadQueryStrategy())
? TransactionalReadQueryStrategy.DYNAMIC
- :
TransactionalReadQueryStrategy.valueOf(yamlDataSourceRuleConfig.getTransactionalReadQueryStrategy());
+ :
TransactionalReadQueryStrategy.valueOf(yamlDataSourceGroupRuleConfig.getTransactionalReadQueryStrategy());
}
@Override
diff --git
a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/ReadwriteSplittingRuleConfigurationYamlIT.java
b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/ReadwriteSplittingRuleConfigurationYamlIT.java
index 6bc06c6cac2..85eb7b25fba 100644
---
a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/ReadwriteSplittingRuleConfigurationYamlIT.java
+++
b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/ReadwriteSplittingRuleConfigurationYamlIT.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.readwritesplitting.yaml;
import org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration;
import
org.apache.shardingsphere.readwritesplitting.yaml.config.YamlReadwriteSplittingRuleConfiguration;
-import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceRuleConfiguration;
+import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration;
import org.apache.shardingsphere.test.it.yaml.YamlRuleConfigurationIT;
import static org.hamcrest.CoreMatchers.is;
@@ -38,22 +38,22 @@ class ReadwriteSplittingRuleConfigurationYamlIT extends
YamlRuleConfigurationIT
}
private void assertReadwriteSplittingRule(final
YamlReadwriteSplittingRuleConfiguration actual) {
- assertThat(actual.getDataSources().size(), is(2));
+ assertThat(actual.getDataSourceGroups().size(), is(2));
assertReadwriteSplittingRuleForDs0(actual);
assertReadwriteSplittingRuleForDs1(actual);
}
private void assertReadwriteSplittingRuleForDs0(final
YamlReadwriteSplittingRuleConfiguration actual) {
- assertNotNull(actual.getDataSources().get("ds_0"));
- YamlReadwriteSplittingDataSourceRuleConfiguration config =
actual.getDataSources().get("ds_0");
+ assertNotNull(actual.getDataSourceGroups().get("ds_0"));
+ YamlReadwriteSplittingDataSourceGroupRuleConfiguration config =
actual.getDataSourceGroups().get("ds_0");
assertThat(config.getWriteDataSourceName(), is("write_ds_0"));
- assertThat(actual.getDataSources().get("ds_0").getLoadBalancerName(),
is("roundRobin"));
+
assertThat(actual.getDataSourceGroups().get("ds_0").getLoadBalancerName(),
is("roundRobin"));
}
private void assertReadwriteSplittingRuleForDs1(final
YamlReadwriteSplittingRuleConfiguration actual) {
- assertNotNull(actual.getDataSources().get("ds_1"));
- YamlReadwriteSplittingDataSourceRuleConfiguration config =
actual.getDataSources().get("ds_1");
+ assertNotNull(actual.getDataSourceGroups().get("ds_1"));
+ YamlReadwriteSplittingDataSourceGroupRuleConfiguration config =
actual.getDataSourceGroups().get("ds_1");
assertThat(config.getWriteDataSourceName(), is("write_ds_1"));
- assertThat(actual.getDataSources().get("ds_1").getLoadBalancerName(),
is("random"));
+
assertThat(actual.getDataSourceGroups().get("ds_1").getLoadBalancerName(),
is("random"));
}
}
diff --git
a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingRuleConfigurationSwapperTest.java
b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingRuleConfigurationSwapperTest.java
index cddd6c064ea..a8a9a568b88 100644
---
a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingRuleConfigurationSwapperTest.java
+++
b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/YamlReadwriteSplittingRuleConfigurationSwapperTest.java
@@ -22,7 +22,7 @@ import
org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfigur
import
org.apache.shardingsphere.readwritesplitting.api.ReadwriteSplittingRuleConfiguration;
import
org.apache.shardingsphere.readwritesplitting.api.rule.ReadwriteSplittingDataSourceGroupRuleConfiguration;
import
org.apache.shardingsphere.readwritesplitting.yaml.config.YamlReadwriteSplittingRuleConfiguration;
-import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceRuleConfiguration;
+import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
@@ -40,16 +40,16 @@ class YamlReadwriteSplittingRuleConfigurationSwapperTest {
@Test
void assertSwapToYamlConfiguration() {
YamlReadwriteSplittingRuleConfiguration actual =
getSwapper().swapToYamlConfiguration(creatReadwriteSplittingRuleConfiguration());
- assertThat(actual.getDataSources().size(), is(1));
+ assertThat(actual.getDataSourceGroups().size(), is(1));
assertThat(actual.getLoadBalancers().size(), is(1));
assertReadwriteSplittingRule(actual);
}
void assertReadwriteSplittingRule(final
YamlReadwriteSplittingRuleConfiguration actual) {
- assertNotNull(actual.getDataSources().get("readwrite"));
- YamlReadwriteSplittingDataSourceRuleConfiguration config =
actual.getDataSources().get("readwrite");
+ assertNotNull(actual.getDataSourceGroups().get("readwrite"));
+ YamlReadwriteSplittingDataSourceGroupRuleConfiguration config =
actual.getDataSourceGroups().get("readwrite");
assertThat(config.getWriteDataSourceName(), is("write_ds"));
-
assertThat(actual.getDataSources().get("readwrite").getLoadBalancerName(),
is("random"));
+
assertThat(actual.getDataSourceGroups().get("readwrite").getLoadBalancerName(),
is("random"));
}
void assertReadwriteSplittingRule(final
ReadwriteSplittingRuleConfiguration actual) {
@@ -75,12 +75,12 @@ class YamlReadwriteSplittingRuleConfigurationSwapperTest {
}
private YamlReadwriteSplittingRuleConfiguration
createYamlReadwriteSplittingRuleConfiguration() {
- YamlReadwriteSplittingDataSourceRuleConfiguration dataSourceRuleConfig
= new YamlReadwriteSplittingDataSourceRuleConfiguration();
- dataSourceRuleConfig.setReadDataSourceNames(Arrays.asList("read_ds_0",
"read_ds_1"));
- dataSourceRuleConfig.setWriteDataSourceName("write_ds");
- dataSourceRuleConfig.setLoadBalancerName("random");
+ YamlReadwriteSplittingDataSourceGroupRuleConfiguration
dataSourceGroupRuleConfig = new
YamlReadwriteSplittingDataSourceGroupRuleConfiguration();
+
dataSourceGroupRuleConfig.setReadDataSourceNames(Arrays.asList("read_ds_0",
"read_ds_1"));
+ dataSourceGroupRuleConfig.setWriteDataSourceName("write_ds");
+ dataSourceGroupRuleConfig.setLoadBalancerName("random");
YamlReadwriteSplittingRuleConfiguration result = new
YamlReadwriteSplittingRuleConfiguration();
- result.getDataSources().put("t_readwrite", dataSourceRuleConfig);
+ result.getDataSourceGroups().put("t_readwrite",
dataSourceGroupRuleConfig);
YamlAlgorithmConfiguration algorithmConfig = new
YamlAlgorithmConfiguration();
algorithmConfig.setType("RANDOM");
result.getLoadBalancers().put("random_loadbalancer", algorithmConfig);
diff --git
a/features/readwrite-splitting/core/src/test/resources/yaml/readwrite-splitting-rule.yaml
b/features/readwrite-splitting/core/src/test/resources/yaml/readwrite-splitting-rule.yaml
index 0f0610678da..e6743f1534c 100644
---
a/features/readwrite-splitting/core/src/test/resources/yaml/readwrite-splitting-rule.yaml
+++
b/features/readwrite-splitting/core/src/test/resources/yaml/readwrite-splitting-rule.yaml
@@ -31,7 +31,7 @@ dataSources:
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoaderTest.java
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoaderTest.java
index b7c42d1d447..a2886d86fce 100644
---
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoaderTest.java
+++
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoaderTest.java
@@ -24,7 +24,7 @@ import
org.apache.shardingsphere.proxy.backend.config.yaml.YamlProxyDataSourceCo
import
org.apache.shardingsphere.proxy.backend.config.yaml.YamlProxyDatabaseConfiguration;
import
org.apache.shardingsphere.proxy.backend.config.yaml.YamlProxyServerConfiguration;
import
org.apache.shardingsphere.readwritesplitting.yaml.config.YamlReadwriteSplittingRuleConfiguration;
-import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceRuleConfiguration;
+import
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration;
import
org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration;
import org.junit.jupiter.api.Test;
@@ -102,12 +102,12 @@ class ProxyConfigurationLoaderTest {
Optional<YamlReadwriteSplittingRuleConfiguration> ruleConfig =
actual.getRules().stream()
.filter(each -> each instanceof
YamlReadwriteSplittingRuleConfiguration).findFirst().map(each ->
(YamlReadwriteSplittingRuleConfiguration) each);
assertTrue(ruleConfig.isPresent());
- for (YamlReadwriteSplittingDataSourceRuleConfiguration each :
ruleConfig.get().getDataSources().values()) {
+ for (YamlReadwriteSplittingDataSourceGroupRuleConfiguration each :
ruleConfig.get().getDataSourceGroups().values()) {
assertReadwriteSplittingRuleConfiguration(each);
}
}
- private void assertReadwriteSplittingRuleConfiguration(final
YamlReadwriteSplittingDataSourceRuleConfiguration actual) {
+ private void assertReadwriteSplittingRuleConfiguration(final
YamlReadwriteSplittingDataSourceGroupRuleConfiguration actual) {
assertThat(actual.getWriteDataSourceName(), is("write_ds"));
assertThat(actual.getReadDataSourceNames(),
is(Arrays.asList("read_ds_0", "read_ds_1")));
}
diff --git
a/proxy/backend/core/src/test/resources/conf/config_loader/database-readwrite-splitting.yaml
b/proxy/backend/core/src/test/resources/conf/config_loader/database-readwrite-splitting.yaml
index e1e666f4b0f..960caff7998 100644
---
a/proxy/backend/core/src/test/resources/conf/config_loader/database-readwrite-splitting.yaml
+++
b/proxy/backend/core/src/test/resources/conf/config_loader/database-readwrite-splitting.yaml
@@ -48,7 +48,7 @@ dataSources:
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/proxy/backend/core/src/test/resources/conf/convert/database-mix.yaml
b/proxy/backend/core/src/test/resources/conf/convert/database-mix.yaml
index a2bdf3fc492..1d48e74363b 100644
--- a/proxy/backend/core/src/test/resources/conf/convert/database-mix.yaml
+++ b/proxy/backend/core/src/test/resources/conf/convert/database-mix.yaml
@@ -106,7 +106,7 @@ rules:
snowflake:
type: SNOWFLAKE
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: ds_0
readDataSourceNames:
diff --git
a/proxy/backend/core/src/test/resources/conf/convert/database-readwrite-splitting.yaml
b/proxy/backend/core/src/test/resources/conf/convert/database-readwrite-splitting.yaml
index 47e0bcb6515..bf2f84b657e 100644
---
a/proxy/backend/core/src/test/resources/conf/convert/database-readwrite-splitting.yaml
+++
b/proxy/backend/core/src/test/resources/conf/convert/database-readwrite-splitting.yaml
@@ -48,7 +48,7 @@ dataSources:
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
transactionalReadQueryStrategy: PRIMARY
writeDataSourceName: write_ds_0
diff --git
a/proxy/backend/core/src/test/resources/conf/import/database-readwrite-splitting.yaml
b/proxy/backend/core/src/test/resources/conf/import/database-readwrite-splitting.yaml
index 30af779bda0..c2e838e8849 100644
---
a/proxy/backend/core/src/test/resources/conf/import/database-readwrite-splitting.yaml
+++
b/proxy/backend/core/src/test/resources/conf/import/database-readwrite-splitting.yaml
@@ -51,7 +51,7 @@ dataSources:
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/proxy/backend/core/src/test/resources/conf/swap/database-readwrite-splitting.yaml
b/proxy/backend/core/src/test/resources/conf/swap/database-readwrite-splitting.yaml
index 0000f16531a..5c663a85384 100644
---
a/proxy/backend/core/src/test/resources/conf/swap/database-readwrite-splitting.yaml
+++
b/proxy/backend/core/src/test/resources/conf/swap/database-readwrite-splitting.yaml
@@ -31,7 +31,7 @@ dataSources:
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: foo_db
readDataSourceNames:
diff --git
a/proxy/bootstrap/src/main/resources/conf/database-readwrite-splitting.yaml
b/proxy/bootstrap/src/main/resources/conf/database-readwrite-splitting.yaml
index f654255f750..844984ed837 100644
--- a/proxy/bootstrap/src/main/resources/conf/database-readwrite-splitting.yaml
+++ b/proxy/bootstrap/src/main/resources/conf/database-readwrite-splitting.yaml
@@ -55,7 +55,7 @@
#
#rules:
#- !READWRITE_SPLITTING
-# dataSources:
+# dataSourceGroups:
# readwrite_ds:
# writeDataSourceName: primary_ds
# readDataSourceNames:
@@ -105,7 +105,7 @@
#
#rules:
#- !READWRITE_SPLITTING
-# dataSources:
+# dataSourceGroups:
# readwrite_ds:
# writeDataSourceName: write_ds
# readDataSourceNames:
diff --git
a/test/e2e/driver/src/test/resources/config/database-readwrite-splitting.yaml
b/test/e2e/driver/src/test/resources/config/database-readwrite-splitting.yaml
index 0a1ff75843c..21499fd7fc6 100644
---
a/test/e2e/driver/src/test/resources/config/database-readwrite-splitting.yaml
+++
b/test/e2e/driver/src/test/resources/config/database-readwrite-splitting.yaml
@@ -22,7 +22,7 @@ rules:
tables:
- "*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
test_ds:
writeDataSourceName: test_primary_ds
readDataSourceNames:
diff --git
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-local.yaml
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-local.yaml
index 7902579b83b..d92cc08e129 100644
---
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-local.yaml
+++
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-local.yaml
@@ -52,7 +52,7 @@ dataSources:
minPoolSize: 2
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-xa-atomikos.yaml
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-xa-atomikos.yaml
index b1d107409ea..85fae348b0f 100644
---
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-xa-atomikos.yaml
+++
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-xa-atomikos.yaml
@@ -52,7 +52,7 @@ dataSources:
minPoolSize: 2
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-xa-narayana.yaml
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-xa-narayana.yaml
index c077398f68c..d7423aabde5 100644
---
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-xa-narayana.yaml
+++
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/jdbc/conf/mysql/database-readwrite-splitting-xa-narayana.yaml
@@ -52,7 +52,7 @@ dataSources:
minPoolSize: 2
rules:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/mysql/database-readwrite-splitting.yaml
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/mysql/database-readwrite-splitting.yaml
index 59bcf8d7faa..e1c20158ac6 100644
---
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/mysql/database-readwrite-splitting.yaml
+++
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/mysql/database-readwrite-splitting.yaml
@@ -65,7 +65,7 @@ rules:
tables:
- "*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/opengauss/database-readwrite-splitting.yaml
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/opengauss/database-readwrite-splitting.yaml
index 585ad175f8f..dec0bbecb77 100644
---
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/opengauss/database-readwrite-splitting.yaml
+++
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/opengauss/database-readwrite-splitting.yaml
@@ -65,7 +65,7 @@ rules:
tables:
- "*.*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/postgresql/database-readwrite-splitting.yaml
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/postgresql/database-readwrite-splitting.yaml
index 961509c274f..d9bb42aabcb 100644
---
a/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/postgresql/database-readwrite-splitting.yaml
+++
b/test/e2e/operation/transaction/src/test/resources/env/scenario/readwrite-splitting/proxy/conf/postgresql/database-readwrite-splitting.yaml
@@ -65,7 +65,7 @@ rules:
tables:
- "*.*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/mysql/database-dbtbl-with-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/mysql/database-dbtbl-with-readwrite-splitting.yaml
index 3d1b42a801f..d0aedfb5858 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/mysql/database-dbtbl-with-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/mysql/database-dbtbl-with-readwrite-splitting.yaml
@@ -264,7 +264,7 @@ rules:
- t_product_category
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/opengauss/database-dbtbl-with-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/opengauss/database-dbtbl-with-readwrite-splitting.yaml
index 64a2e25b9b2..6c47f328930 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/opengauss/database-dbtbl-with-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/opengauss/database-dbtbl-with-readwrite-splitting.yaml
@@ -264,7 +264,7 @@ rules:
- t_product_category
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/postgresql/database-dbtbl-with-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/postgresql/database-dbtbl-with-readwrite-splitting.yaml
index d2ac2267125..c53e0bc01b8 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/postgresql/database-dbtbl-with-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/conf/postgresql/database-dbtbl-with-readwrite-splitting.yaml
@@ -264,7 +264,7 @@ rules:
- t_product_category
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/rules.yaml
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/rules.yaml
index 93ab1e1c09a..d0a0ecf8e72 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/rules.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/rules.yaml
@@ -81,7 +81,7 @@ rules:
- t_product_category
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/mysql/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/mysql/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
index 4405efa9cdd..8af27775556 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/mysql/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/mysql/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
@@ -298,7 +298,7 @@ rules:
- t_product_category
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: encrypt_write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/opengauss/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/opengauss/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
index 87f54253bc0..f4d0e4ffb64 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/opengauss/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/opengauss/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
@@ -297,7 +297,7 @@ rules:
- t_product_category
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: encrypt_write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/postgresql/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/postgresql/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
index 95d35c4031b..f6b4f034731 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/postgresql/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/conf/postgresql/database-dbtbl-with-readwrite-splitting-and-encrypt.yaml
@@ -297,7 +297,7 @@ rules:
- t_product_category
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: encrypt_write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/rules.yaml
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/rules.yaml
index 3a1ec15dcb0..36c3802a4ef 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/rules.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/rules.yaml
@@ -104,7 +104,7 @@ rules:
type: IT.AUDITOR.FIXTURE
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: encrypt_write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/mysql/database-empty-rules.yaml
b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/mysql/database-empty-rules.yaml
index 9f54eda9c6d..51a614d1d3f 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/mysql/database-empty-rules.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/mysql/database-empty-rules.yaml
@@ -254,7 +254,7 @@ rules:
type: IT.AUDITOR.FIXTURE
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/opengauss/database-empty-rules.yaml
b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/opengauss/database-empty-rules.yaml
index 09baec1841b..6474f28590d 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/opengauss/database-empty-rules.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/opengauss/database-empty-rules.yaml
@@ -254,7 +254,7 @@ rules:
type: IT.AUDITOR.FIXTURE
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/postgresql/database-empty-rules.yaml
b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/postgresql/database-empty-rules.yaml
index 8a266e96f1d..5e6b0bb722b 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/postgresql/database-empty-rules.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/conf/postgresql/database-empty-rules.yaml
@@ -254,7 +254,7 @@ rules:
type: IT.AUDITOR.FIXTURE
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds_0:
writeDataSourceName: write_ds_0
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/mysql/database-encrypt-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/mysql/database-encrypt-readwrite-splitting.yaml
index c847752a555..3ebb3fdc1b9 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/mysql/database-encrypt-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/mysql/database-encrypt-readwrite-splitting.yaml
@@ -42,7 +42,7 @@ rules:
tables:
- "*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: encrypt_write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/opengauss/database-encrypt-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/opengauss/database-encrypt-readwrite-splitting.yaml
index 076043d6de0..b6ec04773ac 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/opengauss/database-encrypt-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/opengauss/database-encrypt-readwrite-splitting.yaml
@@ -42,7 +42,7 @@ rules:
tables:
- "*.*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: encrypt_write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/postgresql/database-encrypt-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/postgresql/database-encrypt-readwrite-splitting.yaml
index 68da0716d73..2502c0d615f 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/postgresql/database-encrypt-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/proxy/conf/postgresql/database-encrypt-readwrite-splitting.yaml
@@ -42,7 +42,7 @@ rules:
tables:
- "*.*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: encrypt_write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/rules.yaml
b/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/rules.yaml
index 76af9fa4a58..e81438a2465 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/rules.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/encrypt_and_readwrite_splitting/rules.yaml
@@ -20,7 +20,7 @@ rules:
tables:
- "*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
readwrite_ds:
writeDataSourceName: encrypt_write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/mysql/database-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/mysql/database-readwrite-splitting.yaml
index ac0374abf22..5fd5eb05bfa 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/mysql/database-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/mysql/database-readwrite-splitting.yaml
@@ -72,7 +72,7 @@ rules:
none:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
write-read-ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/opengauss/database-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/opengauss/database-readwrite-splitting.yaml
index 30f1564a737..b5f7cb21aef 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/opengauss/database-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/opengauss/database-readwrite-splitting.yaml
@@ -72,7 +72,7 @@ rules:
none:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
write-read-ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/postgresql/database-readwrite-splitting.yaml
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/postgresql/database-readwrite-splitting.yaml
index 98c902ca7d5..05292ff8a6e 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/postgresql/database-readwrite-splitting.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/proxy/conf/postgresql/database-readwrite-splitting.yaml
@@ -72,7 +72,7 @@ rules:
none:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
write-read-ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/rules.yaml
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/rules.yaml
index af1f596b97c..8dbddae919d 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/rules.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting/rules.yaml
@@ -41,7 +41,7 @@ rules:
none:
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
write-read-ds:
writeDataSourceName: write_ds
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/mysql/database-shadow.yaml
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/mysql/database-shadow.yaml
index d083a8ba86a..a445b3ee622 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/mysql/database-shadow.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/mysql/database-shadow.yaml
@@ -60,7 +60,7 @@ rules:
tables:
- "*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
write-read-ds:
writeDataSourceName: shadowDataSource
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/opengauss/database-shadow.yaml
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/opengauss/database-shadow.yaml
index 2031fd048f0..6e5d16c971d 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/opengauss/database-shadow.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/opengauss/database-shadow.yaml
@@ -60,7 +60,7 @@ rules:
tables:
- "*.*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
write-read-ds:
writeDataSourceName: shadowDataSource
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/postgresql/database-shadow.yaml
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/postgresql/database-shadow.yaml
index cf91d7154f7..93120d6b094 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/postgresql/database-shadow.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/proxy/conf/postgresql/database-shadow.yaml
@@ -60,7 +60,7 @@ rules:
tables:
- "*.*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
write-read-ds:
writeDataSourceName: shadowDataSource
readDataSourceNames:
diff --git
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/rules.yaml
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/rules.yaml
index abee8250f43..aa4afc550be 100644
---
a/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/rules.yaml
+++
b/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/rules.yaml
@@ -20,7 +20,7 @@ rules:
tables:
- "*.*"
- !READWRITE_SPLITTING
- dataSources:
+ dataSourceGroups:
write-read-ds:
writeDataSourceName: shadowDataSource
readDataSourceNames:
diff --git
a/test/native/src/test/resources/test-native/yaml/features/readwrite-splitting.yaml
b/test/native/src/test/resources/test-native/yaml/features/readwrite-splitting.yaml
index d8fa8fa18ac..623e87ca950 100644
---
a/test/native/src/test/resources/test-native/yaml/features/readwrite-splitting.yaml
+++
b/test/native/src/test/resources/test-native/yaml/features/readwrite-splitting.yaml
@@ -45,7 +45,7 @@ rules:
# We need to prevent the logical database name, writeDataSourceName and
readDataSourceNames from being parsed by
# `groovy.lang.Closure` under Native Image for the read-write separation
function.
# That is, switch to another Row Value Expression SPI implementation.
- dataSources:
+ dataSourceGroups:
<LITERAL>readwrite_ds:
writeDataSourceName: <LITERAL>ds_0
readDataSourceNames: