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/11/17 07:09:15 UTC

[GitHub] [shardingsphere] leapcat opened a new issue #13657: Is there a way to support more than one strategies for a same table?

leapcat opened a new issue #13657:
URL: https://github.com/apache/shardingsphere/issues/13657


   ## Feature Request
   
   **For English only**, other languages will not accept.
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot make decision by current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Is your feature request related to a problem?
   
   Yes. 
   1. We are migrating current db sharding framework to ShardingSphere
   2. We need a feature for more than one sharding strategies for a logic table so as to be back compatible for the current usage sceneriaios. 
   3. I would get a "Only allowed 0 or 1 sharding strategy configuration" error if I config 2 strategies for a same table.
   
   ### Describe the feature you would like.
   
   For example, I have a logic table (order) which has 4 * 128 actual tables. 
   1. Sometimes we want to use Complex strategy with specified sharding colums
   2. Sometimes we need Hint strategy to batch load or update records from one of the tables,  especially in a job situation, we would split sub tasks which will execute SQL for one table concurrently.
   
   I wonder if there is a feature to support more than 1 strategies for a logic table, or any tricks?
   
   ShardingSphere Version: 4.1.1
   The following is the sharding rule config of the table (order) :
   ```yaml
       order:
         actualDataNodes: "db_${(0..3)}.order_$->{(0..3)}"
         databaseStrategy:
           complex:
             shardingColumns: id, client_id
             algorithmClassName: com.*.OrderShardingAlgorithm$DbSharding
   #        hint:
   #          algorithmClassName: com.*.OrderShardingAlgorithm$DbSharding
         tableStrategy:
           complex:
             shardingColumns: id, client_id
             algorithmClassName: com.*.OrderShardingAlgorithm$TableSharding
   #        hint:
   #          algorithmClassName: com.*.OrderShardingAlgorithm$DbSharding
   ```
   


-- 
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] terrymanu commented on issue #13657: Is there a way to support more than one strategies for a same table?

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


   No, this is the temporary requirement, maybe sacling module can help you to migirate.


-- 
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] terrymanu edited a comment on issue #13657: Is there a way to support more than one strategies for a same table?

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


   No, this is the temporary requirement, maybe scaling module can help you to migrate.


-- 
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] terrymanu closed issue #13657: Is there a way to support more than one strategies for a same table?

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


   


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