linghengqian commented on issue #32734: URL: https://github.com/apache/shardingsphere/issues/32734#issuecomment-2321313417
- In the current design, there is an SPI to dynamically generate `actualDataNodes` when initializing ShardingSphere JDBC DataSource. It currently has 4 built-in implementations, refer to https://shardingsphere.apache.org/document/current/cn/user-manual/common-config/builtin-algorithm/expr/ . This SPI was originally designed to solve the dynamic configuration problem of Groovy expressions under GraalVM Native Image. - Once ShardingSphere JDBC DataSource is successfully created, modifying `actualDataNodes` has nothing to do with the initialization configuration file. If it is ShardingSphere JDBC, you need to get the ShardingSphere JDBC Connection of the current ShardingSphere JDBC DataSource, and then get the `ContextManager` to change the internal metadata of ShardingSphere JDBC DataSource. If it is ShardingSphere Proxy, there are 2 DistSQL: `REFRESH DATABASE METADATA;` and `REFRESH TABLE METADATA;`, refer to https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/ . - So you want to propose a new design? -- 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-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org