zhaojinchao95 opened a new issue, #24020:
URL: https://github.com/apache/shardingsphere/issues/24020
server.yaml :
```
mode:
type: Cluster
repository:
type: ZooKeeper
props:
namespace: governance_ds
server-lists: localhost:2181
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
authority:
users:
- user: root@%
password: root
- user: sharding
password: sharding
privilege:
type: ALL_PERMITTED
props:
sql-federation-type: ADVANCED
```
config-sharding.yaml :
```
databaseName: sharding_db
dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !SHARDING
tables:
t_order:
actualDataNodes: ds_0.t_order_${0..1}
tableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: t_order_inline
shardingAlgorithms:
t_order_inline:
type: INLINE
props:
algorithm-expression: t_order_${order_id % 2}
```
DistSQL :
```
REGISTER STORAGE UNIT ds_1 (
URL="jdbc:postgresql://127.0.0.1:5432/test",
USER="postgres",
PASSWORD="123456",
PROPERTIES("minPoolSize"=1,"maxPoolSize"=20,"idleTimeout"="60000"));
```
Table in MySQL :
```
CREATE TABLE t_order_0 (
order_id INT NOT NULL,
user_id INT NOT NULL
);
CREATE TABLE t_order_1 (
order_id INT NOT NULL,
user_id INT NOT NULL
);
```
Table in PG :
```
CREATE TABLE t_order_pg (
order_id INT NOT NULL,
user_id INT NOT NULL
);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]