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 2019/09/12 06:06:31 UTC

[GitHub] [incubator-shardingsphere] ningyu1 opened a new issue #2873: How to get the results of the database sharding algorithm in the table sharding algorithm

ningyu1 opened a new issue #2873: How to get the results of the database sharding algorithm in the table sharding algorithm
URL: https://github.com/apache/incubator-shardingsphere/issues/2873
 
 
   ## How to get the results of the database fragmentation algorithm in the table fragmentation algorithm
   
   Partition key format: `YYYYMM`, for example: 201908
   
   Database actualDataNodes: ds${2017..2019}
   
   Table actualDataNodes: ds${2017..2019}
   
   Now I am experiencing the following problem.
   
   When implementing the RangeShardingAlgorithm interface, when the 'between and' is processed, the condition is 'between 201801 and 201908'. In fact, you should go to the order1 to order12 table of the ds2018 library and the order1 to order8 table of the ds2019 library for query.
   
   In the algorithm class of the table, how to obtain the routedDataSources value in the current loop, and determine whether to cross the year according to routedDataSources, thereby determining the range of the table.
   
   The current status quo is that the database algorithm returns 'ds2018, ds2019', and then calls the table 'dosharding' method according to the number of sub-database results, but the table 'dosharding' method cannot get the routedDataSources of the current loop, so it is impossible to know. What database is the current loop, so it is impossible to handle the exact range of table values.
   
   This problem is bothering me and I hope to get help.

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