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/11/25 03:18:13 UTC

[GitHub] [shardingsphere] noisyjin opened a new issue #8328: sharding-jdbc不支持单分库不分表吗?使用Hint方式分库

noisyjin opened a new issue #8328:
URL: https://github.com/apache/shardingsphere/issues/8328


   使用ShardingRuleConfiguration配置时指定按照Hint方式作为默认的数据源分片方式,通过debug发现,在进入ShardingRouteEngine的newInstance方法后,由于判断条件存在`!shardingRule.tableRuleExists(tableNames)`,如果未分表,则返回`new ShardingUnicastRoutingEngine(tableNames);` 该路由引擎通过随机的方式返回数据源`String dataSourceName = shardingRule.getShardingDataSourceNames().getRandomDataSourceName();`,也就是说如果我不分表,只通过hint分库的情况下,使用sharding-jdbc是不能支持吗?或者说即使分表,但是查询语句表不是分表的表,也存在分库策略不生效的情况吗?是我理解有误,还是配置错误,或者设计如此,希望解答,感激不尽。
   


----------------------------------------------------------------
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] dongzl commented on issue #8328: sharding-jdbc不支持单分库不分表吗?使用Hint方式分库

Posted by GitBox <gi...@apache.org>.
dongzl commented on issue #8328:
URL: https://github.com/apache/shardingsphere/issues/8328#issuecomment-733440895


   Hi @noisyjin ,For English only, other language not support. I will close this issue, please resubmit a new issue in English.


----------------------------------------------------------------
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] dongzl closed issue #8328: sharding-jdbc不支持单分库不分表吗?使用Hint方式分库

Posted by GitBox <gi...@apache.org>.
dongzl closed issue #8328:
URL: https://github.com/apache/shardingsphere/issues/8328


   


----------------------------------------------------------------
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] noisyjin commented on issue #8328: sharding-jdbc不支持单分库不分表吗?使用Hint方式分库

Posted by GitBox <gi...@apache.org>.
noisyjin commented on issue #8328:
URL: https://github.com/apache/shardingsphere/issues/8328#issuecomment-733437215


   sharding-jdbc-core 版本4.1.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