You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/01/18 06:27:41 UTC

[GitHub] KomachiSion edited a comment on issue #1763: The correct result cannot be found when the binding table is associated with the query

KomachiSion edited a comment on issue #1763: The correct result cannot be found when the binding table is associated with the query
URL: https://github.com/apache/incubator-shardingsphere/issues/1763#issuecomment-455441055
 
 
   I have recurrent this problem, I find there is a error in your configuration.
   
   The binding table in ShardingSphere is to bind the sequence of actual nodes between two sharding tables.
   In your configuration, table **t_order** will be parsed to 
   ```
   1 demo_ds_0.t_order_0
   2 demo_ds_0.t_order_1
   3 demo_ds_1.t_order_0
   4 demo_ds_1.t_order_1
   ```
   but table **t_order_item** is 
   ```
   1 demo_ds_0.t_order_item_1
   2 demo_ds_0.t_order_item_0
   3 demo_ds_1.t_order_item_1
   4 demo_ds_1.t_order_item_0
   ```
   So when routing **t_order** to **demo_ds_0.t_order_1**(2) and **demo_ds_1.t_order_1**(4), ShardingSphere will get **demo_ds_0.t_order_item_0**(2) and **demo_ds_1.t_order_item_0**(4)
   
   But your sharding rule is **demo_ds_0.t_order_1** map to **demo_ds_0.t_order_item_1**. Then your problem happened. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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