robben009 opened a new issue, #32056:
URL: https://github.com/apache/shardingsphere/issues/32056
5.5version
`
dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.jdbc.Driver
jdbcUrl: *
username: *
password: *
rules:
- !SINGLE
tables:
- "*.*"
defaultDataSource: ds_0
- !SHARDING
tables:
test_order:
actualDataNodes: ds_0.test_order_${0..1}
tableStrategy:
standard:
shardingColumn: id
shardingAlgorithmName: OrderShardingRules
bindingTables:
- test_order
shardingAlgorithms:
OrderShardingRules:
type: CLASS_BASED
props:
strategy: STANDARD
algorithmClassName: *
`
Then I use the following code
`
@Operation(summary = "查询订单")
@PostMapping("/order")
public TestOrder order() {
HintManager hintManager = HintManager.getInstance();
hintManager.addTableShardingValue("test_order", 1);
TestOrder t = testOrderService.getOne(new
LambdaQueryWrapper<TestOrder>()
.eq(TestOrder::getUserId, "100")
.eq(TestOrder::getOrderStatus, 40), false);
hintManager.clear();
return t;
}
`
I found that no matter how " hintManager.addTableShardingValue("test_order",
1);" is written, data can be found,It's like a full table scan
Why is this?
--
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]