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/09/01 08:02:52 UTC

[GitHub] [shardingsphere] zhaojitao opened a new issue #7196: In multi-tenant mode database sharding invalid

zhaojitao opened a new issue #7196:
URL: https://github.com/apache/shardingsphere/issues/7196


   ## Question
   
   ![image](https://user-images.githubusercontent.com/17734542/91823534-eec89500-ec6b-11ea-85cf-793a3307301e.png)
   In multi-tenant mode, all tables of each tenant have the same structure and are partitioned according to tenant ID. Since there are hundreds and thousands of tables in the business that need to be partitioned, can the program execute the default partitioning rule without specifying tables? After testing, if the tables that need to be partitioned are not specified, the default partitioning rule will be invalid


----------------------------------------------------------------
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] zhaojitao closed issue #7196: In multi-tenant mode database sharding invalid

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


   


----------------------------------------------------------------
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 #7196: In multi-tenant mode database sharding invalid

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


   Hi @zhaojitao 
   I have to say that meet the expectation.  i.e., Even though users use `defaultDatabaseRulerule`, a simplified `tableRule` with `DatabaseRulerule` is still unavoidable. Otherwide, how does shardingSphere know this table is a sharding table or non-sharding table?
   
    


----------------------------------------------------------------
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] zhonghuali commented on issue #7196: In multi-tenant mode database sharding invalid

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


   Striongly suggest to add new config for setting whether all tables are default sharded or not, then simplifying this kind of configuration


-- 
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] zhaojitao commented on issue #7196: In multi-tenant mode database sharding invalid

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


   @tristaZero Let's try a different idea here, which is to set whether all tables are default sharded or not, and then add a table that excloud doesn't go with the default rule (whether sharding or not), which helps us achieve that goal of simplifying configuration, which is of course a small recommendation. Here's a code snippet that helps clarify


----------------------------------------------------------------
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] zhaojitao commented on issue #7196: In multi-tenant mode database sharding invalid

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


   @tristaZero ok,you are right! thanks!


----------------------------------------------------------------
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] zhaojitao commented on issue #7196: In multi-tenant mode database sharding invalid

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


   @tristaZero yes,The defaultDatabaseRulerule is not valid if actualDataNodes are not configured。I have 1000 table needed sharding database, do I need to configure actualDataNodes? Is that 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 #7196: In multi-tenant mode database sharding invalid

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


   @zhaojitao Do we have the same understanding of `defaultTableRule`? If there is `defaultTableRule`, you can ignore configuring the shardingStratergy, but `actualDataNodes: ds_${0..1}.t_order_${0..1}` is required yet, 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] zhaojitao commented on issue #7196: In multi-tenant mode database sharding invalid

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


   Hi @TristaZero
   ![image](https://user-images.githubusercontent.com/17734542/91954163-fe131580-ed33-11ea-931d-8118c6b1c52a.png)
   ![image](https://user-images.githubusercontent.com/17734542/91954289-2f8be100-ed34-11ea-83bb-4398dad4ec8e.png)
   


----------------------------------------------------------------
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] zhaojitao commented on issue #7196: In multi-tenant mode database sharding invalid

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


   Hi @tristaZero 
   ![image](https://user-images.githubusercontent.com/17734542/91953765-d58b1b80-ed33-11ea-87e3-09fd6612e3fc.png)
   ![image](https://user-images.githubusercontent.com/17734542/91953839-dc199300-ed33-11ea-99d3-9f8df037bf46.png)
   


----------------------------------------------------------------
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] zhaojitao edited a comment on issue #7196: In multi-tenant mode database sharding invalid

Posted by GitBox <gi...@apache.org>.
zhaojitao edited a comment on issue #7196:
URL: https://github.com/apache/shardingsphere/issues/7196#issuecomment-685421612


   Hi @TristaZero
   ![image](https://user-images.githubusercontent.com/17734542/91970031-a1baf080-ed49-11ea-9f71-1884ae9a1c87.png)
   ![image](https://user-images.githubusercontent.com/17734542/91954163-fe131580-ed33-11ea-931d-8118c6b1c52a.png)
   ![image](https://user-images.githubusercontent.com/17734542/91954289-2f8be100-ed34-11ea-83bb-4398dad4ec8e.png)
   


----------------------------------------------------------------
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 #7196: In multi-tenant mode database sharding invalid

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


   @zhaojitao Sorry I can not get your idea clear. Do you mean to add one configuration item to set some of the tables using `defaultDatabaseRulerule`?
   BTW, at present, you just need to configure a table name for those intending to use `defaultDatabaseRulerule`. It seems not taxing?


----------------------------------------------------------------
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] zhaojitao commented on issue #7196: In multi-tenant mode database sharding invalid

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


   <!--javaapi配置方式引入 -->
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-core</artifactId>
               <version>4.1.1</version>
           </dependency>


----------------------------------------------------------------
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 #7196: In multi-tenant mode database sharding invalid

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


   Hi @zhaojitao 
   AFAIK, no one gave any feedback about this issue so far. Could you set `sql.show` right. So we can check whether the default strategy works or not. 


----------------------------------------------------------------
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] zhonghuali edited a comment on issue #7196: In multi-tenant mode database sharding invalid

Posted by GitBox <gi...@apache.org>.
zhonghuali edited a comment on issue #7196:
URL: https://github.com/apache/shardingsphere/issues/7196#issuecomment-826602578


   Strongly suggest to add new config for setting whether all tables are default sharded or not, then simplifying this kind of configuration


-- 
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 edited a comment on issue #7196: In multi-tenant mode database sharding invalid

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #7196:
URL: https://github.com/apache/shardingsphere/issues/7196#issuecomment-686307459


   Hi @zhaojitao 
   I have to say that meet the expectation.  i.e., Even though users use `defaultDatabaseRulerule`, a simplified `tableRule` with `DatabaseRulerule` is still unavoidable. Otherwise, how does shardingSphere know this table is a sharding table or non-sharding table?
   
    


----------------------------------------------------------------
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] zhaojitao removed a comment on issue #7196: In multi-tenant mode database sharding invalid

Posted by GitBox <gi...@apache.org>.
zhaojitao removed a comment on issue #7196:
URL: https://github.com/apache/shardingsphere/issues/7196#issuecomment-685420304


   Hi @tristaZero 
   ![image](https://user-images.githubusercontent.com/17734542/91953765-d58b1b80-ed33-11ea-87e3-09fd6612e3fc.png)
   ![image](https://user-images.githubusercontent.com/17734542/91953839-dc199300-ed33-11ea-99d3-9f8df037bf46.png)
   


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