terrymanu commented on issue #30922:
URL:
https://github.com/apache/shardingsphere/issues/30922#issuecomment-3538524634
Thank you for reporting this issue. After analysis, this is not a
ShardingSphere bug, but rather a configuration that doesn't comply with
ShardingSphere's design principles.
## Root Cause Analysis
Your configuration violates ShardingSphere's core design principle: one
sharded table can only have one sharding strategy.
In your configuration:
```yaml
test_:
actualDataNodes: sharding_test.test_$->{0..4}
tableStrategy:
standard:
shardingColumn: id
shardingAlgorithmName: ModAlgorithm
test_hint_:
actualDataNodes: sharding_test.test_$->{0..4} # Same physical table
tableStrategy:
hint:
shardingAlgorithmName: HintAlgorithm
```
You configured two different logical tables and sharding strategies for
the same physical table sharding_test.test_{0..4}, which is incorrect usage.
## Key Concepts
1. Logical Table: One logical table should only have one sharding strategy
2. HintManager: Used to specify sharding values at runtime, not to
configure multiple strategies for the same table
3. Physical Tables: The actual tables test_0, test_1, test_2, test_3,
test_4
## Version Differences
From 5.3.2 to 5.4.1, stricter table existence validation was added, which
exposed this configuration issue. This is a reasonable improvement that helps
users identify configuration errors early.
We recommend configuring according to ShardingSphere's design principles -
one sharded table should use only one logical table name and one sharding
strategy.
--
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]