menghaoranss opened a new issue #12647:
URL: https://github.com/apache/shardingsphere/issues/12647


   In class `ClusterContextManagerCoordinator`, when meta data just like data 
source, rules and schema changed, the `MetaDataContext` is rebuilt by `new 
MetaDataContexts`, and `StateContext` in `MetaDataContexts` is reset.
   
   ```
   private MetaDataContexts rebuildMetaDataContexts(final Map<String, 
ShardingSphereMetaData> schemaMetaData) {
           
Preconditions.checkState(contextManager.getMetaDataContexts().getMetaDataPersistService().isPresent());
           return new 
MetaDataContexts(contextManager.getMetaDataContexts().getMetaDataPersistService().get(),
                   schemaMetaData, 
contextManager.getMetaDataContexts().getGlobalRuleMetaData(), 
contextManager.getMetaDataContexts().getExecutorEngine(),
                   contextManager.getMetaDataContexts().getProps(), 
contextManager.getMetaDataContexts().getOptimizerContext());
       }
   ```
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to