qinnnyul commented on issue #2148: how to pass mapping logic into 
sharding-algorithm?
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2148#issuecomment-479451822
 
 
   @wgy8283335 yep, actually that is the very first solution which I tried, you 
know, nobody likes writing their own sharding algorithm if inline expression is 
suitable to this case:)
   
   So what I did today was writing customised spring configuration to capture 
tenant related mapping logic, then pass it along to XXShardingAlgorithm, it 
works, but it seems like this kind of configuration will not be `watched` or 
`monitored` by etcd/zk or `mysql, which is a new register center, we extended 
from  sharding-orchestration-reg-api`
   
   e.g:
   ```
   XX.sharding.tenant-id.tables.t_order.1=_0
   XX.sharding.tenant-id.tables.t_order.4=_0
   XX.sharding.tenant-id.tables.t_order.5=_0
   XX.sharding.tenant-id.tables.t_order.7=_0
   XX.sharding.tenant-id.tables.t_order.other=_1
   
   XX.sharding.tenant-id.tables.t_order_item.1=_0
   XX.sharding.tenant-id.tables.t_order_item.4=_0
   XX.sharding.tenant-id.tables.t_order_item.5=_0
   XX.sharding.tenant-id.tables.t_order_item.7=_0
   XX.sharding.tenant-id.tables.t_order_item.other=_1
   ```
   what do you recommend?  thx
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to