LostMyth opened a new issue, #31374:
URL: https://github.com/apache/shardingsphere/issues/31374
Shardingsphere-JDBC 5.5.0 does not support multiple sharding rules for the
same table. In my business scenarios, most of the scenarios use standard rule,
but in some special scenarios, I need to use hint rule. How can I configure it
so that I can use two kinds of sharding rules? I read the introduction of
forced routing in the official website, if I configure hint rule, I can't use
other sharding rules, right?
i tried this
```
tables:
t_order:
actualDataNodes: ds_$->{0..2}.t_order_$->{0..3}
databaseStrategy:
standard:
shardingColumn: member_id
shardingAlgorithmName: datasourceClassBased
hint:
shardingAlgorithmName: datasourceHintClassBased
tableStrategy:
standard:
shardingColumn: member_id
shardingAlgorithmName: tableClassBased
hint:
shardingAlgorithmName: tableHintClassBased
```
it got error: Only allowed 0 or 1 sharding strategy configuration.
and i tried this
```
tables:
t_order:
actualDataNodes: ds_$->{0..2}.t_order_$->{0..3}
databaseStrategy:
standard:
shardingColumn: member_id
shardingAlgorithmName: datasourceClassBased
tableStrategy:
standard:
shardingColumn: member_id
shardingAlgorithmName: tableClassBased
t_order_hint:
actualDataNodes: ds_$->{0..2}.t_order_$->{0..3}
databaseStrategy:
hint:
shardingAlgorithmName: datasourceHintClassBased
tableStrategy:
hint:
shardingAlgorithmName: tableHintClassBased
```
it got error: Same actual data node cannot be configured in multiple logic
tables in same database, logical table 't_order', actual data node
'ds_0.t_order_0'.
--
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]