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/01/19 13:12:26 UTC

[GitHub] [incubator-shardingsphere] lightyear007 opened a new issue #4028: If not hint values are set what's the routing behavior for HintShardingAlgorithm

lightyear007 opened a new issue #4028: If not hint values are set what's the routing behavior for HintShardingAlgorithm
URL: https://github.com/apache/incubator-shardingsphere/issues/4028
 
 
   According to sharding jdbc doc [https://shardingsphere.apache.org/document/current/cn/manual/sharding-jdbc/usage/hint/], if we want to use the forced routing, we have to implement a HintShardingAlgorithm. My question is that if we have configured a sharding rule using HintShardingAlgorithm, but we didn't set any hint values using the HintManager, then how sharding jdbc can get a clue of how to route the query?
   
   I tried this and found out, if no values are set, my HintShardingAlgorithm implementation code will not be executed. then i would what rule sharding jdbc is using in this case.
   
   Thanks
   Jacky

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] KomachiSion closed issue #4028: If not hint values are set what's the routing behavior for HintShardingAlgorithm

Posted by GitBox <gi...@apache.org>.
KomachiSion closed issue #4028: If not hint values are set what's the routing behavior for HintShardingAlgorithm
URL: https://github.com/apache/incubator-shardingsphere/issues/4028
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] KomachiSion commented on issue #4028: If not hint values are set what's the routing behavior for HintShardingAlgorithm

Posted by GitBox <gi...@apache.org>.
KomachiSion commented on issue #4028: If not hint values are set what's the routing behavior for HintShardingAlgorithm
URL: https://github.com/apache/incubator-shardingsphere/issues/4028#issuecomment-590792353
 
 
   Hi @lightyear007, There are two possible behavior for none-values hint strategy.
   
   1. If the tables in your SQL is not a sharding table( which means you do not configure it in shardingRule), the SQL will be routed to your defaultDatasource. What's more, the defaultDatasource also miss, the SQL will be routed to one random datasource.
   2. If the tables in your SQL is a sharding table, the SQL will be full-routed to all dataNodes you configured.

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] KomachiSion commented on issue #4028: If not hint values are set what's the routing behavior for HintShardingAlgorithm

Posted by GitBox <gi...@apache.org>.
KomachiSion commented on issue #4028: If not hint values are set what's the routing behavior for HintShardingAlgorithm
URL: https://github.com/apache/incubator-shardingsphere/issues/4028#issuecomment-593714362
 
 
   @lightyear007 any response? If no response, we will close issue.

----------------------------------------------------------------
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


With regards,
Apache Git Services