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 2021/01/26 13:36:54 UTC

[GitHub] [shardingsphere] huanghao495430759 opened a new issue #9175: SingleTableRule does it mean table must be in only one database ?

huanghao495430759 opened a new issue #9175:
URL: https://github.com/apache/shardingsphere/issues/9175


   SingleTableRule does it mean table must be in only one database ?
   if that is true, and how to config any unconfigured tables what's in all sharding database ?  use  broadcast-tables ?
   


----------------------------------------------------------------
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] tristaZero commented on issue #9175: SingleTableRule does it mean table must be in only one database ?

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


   Hi,
   
   Our question is how to configure `broadcast table` or `single table`?
   `single table` means there is only one table x in all the data sources managed by ShardingSphere. Therefore the `IllegalStateException` throws up in your case.


----------------------------------------------------------------
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] tristaZero commented on issue #9175: SingleTableRule does it mean table must be in only one database ?

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


   Hi @huanghao495430759 ,
   
   Suppose you do not intend to bind [ A ,B, C, D .....] as a `broadcast` table. In that case, I suggest you'd better not add a broadcast rule to them since a query (e.g., insert) will be executed in all of them to keep these tables containing the same data.
   Later, if  [ A ,B, C, D .....]  are uncorrelated but have the same names, I have to say we can not manage them as different `single` tables. I suppose it is simple to understand that if `ss` is a logic `database`, there is no possibility that the same tables exist in one database, right? 


----------------------------------------------------------------
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] terrymanu closed issue #9175: SingleTableRule does it mean table must be in only one database ?

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


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] huanghao495430759 commented on issue #9175: SingleTableRule does it mean table must be in only one database ?

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


   HAHA,My question is I have many same table[ A ,B, C, D .....] in  all the data sources managed by ShardingSphere,I must be configuration all of them with broadcast tables rules,but I dont't want to do that.


----------------------------------------------------------------
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] huanghao495430759 commented on issue #9175: SingleTableRule does it mean table must be in only one database ?

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


   if I have 2 database as follow:
   
   > datasource1: 
   	user_0
   	table_a
   	table_b
   	
   
   > datasource2:
   	user_1
   	table_a
   	table_b
   
   table[user] is a sharding table rule like:
   
   > sharding-tables:
   	logicTable: user
   	actualTables: user_0,user_1
   
   and I also have any tables : table_a,table_b,..... in both of all database,they are looks like broadcast table,and how to configuration of them ? it looks like onply one way to configuration of them with broadcast-tables, otherwise ss will throw IllegalStateException as :
   
   `
   Single table conflict there are multiple tables .....
   `
   
   


----------------------------------------------------------------
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] tristaZero commented on issue #9175: SingleTableRule does it mean table must be in only one database ?

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


   Hi @huanghao495430759 ,
   
   Suppose you do not intend to bind [ A ,B, C, D .....] as a `broadcast` table. In that case, I suggest you'd better not add a broadcast rule to them since a query (e.g., insert) will be executed in all of them to keep these tables containing the same data.
   Later, if  [ A ,B, C, D .....]  are uncorrelated but have the same names, I have to say we can not manage them as different `single` tables. I suppose it is simple to understand that if `ss` is a logic `database`, there is no possibility that the same tables exist in one database, right? 


----------------------------------------------------------------
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] tristaZero commented on issue #9175: SingleTableRule does it mean table must be in only one database ?

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


   > SingleTableRule does it mean table must be in only one database ?
   
   Yep.
   
   > if that is true, and how to config any unconfigured tables what's in all sharding database ? use broadcast-tables ?
   
   No need for the configuration of single table rules since SS will load all these single tables.


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