Bingai077 opened a new issue, #19521:
URL: https://github.com/apache/shardingsphere/issues/19521
Which version of ShardingSphere did you use?
5.1.2 (helm cluster)
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
Expected behavior
DistSQL has a simple logical table configuration.
Actual behavior
For the case where only the database is shard.
Configuration is as
`
create database ds;
use ds;
ADD RESOURCE ds_abc (
HOST=192.168.0.1,
PORT=3306,
DB=ds_abc,
USER=root,
PASSWORD=123456
);
ADD RESOURCE ds_bcd (
HOST=192.168.0.1,
PORT=3306,
DB=ds_bcd,
USER=root,
PASSWORD=123456
);
CREATE SHARDING ALGORITHM database_inline (
TYPE(NAME=inline,PROPERTIES("algorithm-expression"="ds${tenant_code}"))
);
CREATE DEFAULT SHARDING DATABASE STRATEGY (
TYPE =
standard,SHARDING_COLUMN=tenant_code,SHARDING_ALGORITHM=database_inline
);
CREATE SHARDING TABLE RULE order_test (
datanodes("ds_${['ds_abc','ds_bcd']}.order_test")
)
CREATE SHARDING TABLE RULE user_test (
datanodes("ds_${['ds_abc','ds_bcd']}.user_test")
)
`
How do I use DistSQL if I have many databases and tables that need to be
dynamically sharded?
--
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]