报错内容:
Unknown exception: All tables must be in the same datasource.
配置如下:
rules:
- !READWRITE_SPLITTING
dataSources:
readwrite_ds:
staticStrategy:
writeDataSourceName: write_ds
readDataSourceNames:
- read_ds_0
loadBalancerName: random
loadBalancers:
random:
type: RANDOM
- !SHARDING
tables:
iot_card_info:
actualDataNodes: write_ds.iot_card_info_$->{0..9}
tableStrategy:
standard:
shardingColumn: client_id
shardingAlgorithmName: iot_card_info_hash
shardingAlgorithms:
iot_card_info_hash:
type: HASH_MOD
props:
sharding-count: 10