You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/06/09 15:56:39 UTC
[GitHub] [shardingsphere] taojintianxia opened a new issue #5964: sharding proxy route to unexpected shard
taojintianxia opened a new issue #5964:
URL: https://github.com/apache/shardingsphere/issues/5964
## Bug Report
**For English only**, other languages will not accept.
### Which version of ShardingSphere did you use?
shardingsphere 4.1.1
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
shardingspehre proxy
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Description :
here is the thing, I set up a proxy for sharding database with following configuration :
config-sharding.yaml
```yaml
schemaName: sharding_db
dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/target_schema_0?useSSL=false&socketTimeout=10000
username: root
password: root
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 5
ds_1:
url: jdbc:mysql://127.0.0.1:3306/target_schema_1?useSSL=false&socketTimeout=10000
username: root
password: root
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 5
shardingRule:
tables:
test_shard:
actualDataNodes: ds_${0..1}.test
databaseStrategy:
inline:
shardingColumn: f_user_id
algorithmExpression: ds_${f_user_id % 2}
defaultTableStrategy:
none:
```
when I insert a data with f_user_id = 100003 through sharding proxy , I found that this data has been inserted into target_schema_0 , in another words `ds0` , that confused me , should that data inserted into ds 1 ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] taojintianxia closed issue #5964: sharding proxy route to unexpected shard
Posted by GitBox <gi...@apache.org>.
taojintianxia closed issue #5964:
URL: https://github.com/apache/shardingsphere/issues/5964
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org