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/05/22 03:36:13 UTC

[GitHub] [shardingsphere] LFstefan opened a new issue #5744: Will follow-up support dynamically modify ShardingStrategy at runtime?

LFstefan opened a new issue #5744:
URL: https://github.com/apache/shardingsphere/issues/5744


   Will follow-up support dynamically modify ShardingStrategy at runtime?
   
   
   Now if I want to modify the ShardingStrategy at runtime, I can only implement it in the following way(version: 4.1.0), which is also the way sharding-JDBC-Orchestration uses
   
   `this.dataSource = new ShardingDataSource(this.getChangedDataSources(this.dataSource.getDataSourceMap(), dataSourceConfigurations), (ShardingRule)this.dataSource.getRuntimeContext().getRule(), this.dataSource.getRuntimeContext().getProperties().getProps());`
   
   I think the update granularity in this way is a bit big
   
   In the future, will you provide set methods for these variables at runtime?
   
   `public class ShardingRule implements BaseRule {
        ...
       private final ShardingStrategy defaultDatabaseShardingStrategy;
       private final ShardingStrategy defaultTableShardingStrategy;
       ...
   `
   
   


----------------------------------------------------------------
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] kimmking commented on issue #5744: Will follow-up support dynamically modify ShardingStrategy at runtime?

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


   You can use orchestration with zookeeper, when config is changed, and sharding-jdbc/proxy will be refresh in time.


----------------------------------------------------------------
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] kimmking commented on issue #5744: Will the follow-up support dynamically modify the single table's ShardingStrategy at runtime instead of refreshing the entire datasource?

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


   there is no plan for it.


----------------------------------------------------------------
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] kimmking closed issue #5744: Will the follow-up support dynamically modify the single table's ShardingStrategy at runtime instead of refreshing the entire datasource?

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


   


----------------------------------------------------------------
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] kimmking edited a comment on issue #5744: Will the follow-up support dynamically modify the single table's ShardingStrategy at runtime instead of refreshing the entire datasource?

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


   there is no plan.
   and you can try to optimize it.


----------------------------------------------------------------
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] LFstefan commented on issue #5744: Will the follow-up support dynamically modify the single table's ShardingStrategy at runtime instead of refreshing the entire datasource?

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


   > keep ds config is unmodified, and update sharding strategy only via zk.
   > there is any side effect for your case?
   
   Because we have some special needs to do this, and we have considered the impact of doing so, just want to know if you can provide such support in the future


----------------------------------------------------------------
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] kimmking commented on issue #5744: Will the follow-up support dynamically modify the single table's ShardingStrategy at runtime instead of refreshing the entire datasource?

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


   keep ds config is unmodified, and update sharding strategy only via zk.


----------------------------------------------------------------
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] kimmking edited a comment on issue #5744: Will the follow-up support dynamically modify the single table's ShardingStrategy at runtime instead of refreshing the entire datasource?

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


   keep ds config is unmodified, and update sharding strategy only via zk.
   there is any side effect for 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] LFstefan commented on issue #5744: Will the follow-up support dynamically modify the single table's ShardingStrategy at runtime instead of refreshing the entire database?

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


   > You can use orchestration with zookeeper, when config is changed, and sharding-jdbc/proxy will be refresh in time.
   
   The implementation of orchestration is to refresh the entire datasource, but all I want is to refresh the ShardingStrategy of a certain modified table怂So, will future versions support it


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