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 2021/09/16 11:00:52 UTC
[GitHub] [shardingsphere] menghaoranss opened a new issue #12492: Consider about refactor MetadataRefreshEngine
menghaoranss opened a new issue #12492:
URL: https://github.com/apache/shardingsphere/issues/12492
For current logic, after MetaData is refreshed, the complete `ShardingSphereSchema` will be posted, however, only the MetaData of some tables has been modified for `DDL`, therefore, only the TableMetaData of the part tables needs to be posted.
```
private void refresh(final SQLStatement sqlStatement, final Collection<String> logicDataSourceNames, final Collection<MetadataRefresher> refreshers) throws SQLException {
for (MetadataRefresher each : refreshers) {
if (each instanceof SchemaRefresher) {
((SchemaRefresher) each).refresh(schemaMetadata, logicDataSourceNames, sqlStatement, materials.getProps());
}
if (each instanceof FederateRefresher) {
((FederateRefresher) each).refresh(federateMetadata, logicDataSourceNames, sqlStatement, materials);
}
}
ShardingSphereEventBus.getInstance().post(new SchemaAlteredEvent(schemaMetadata.getName(), schemaMetadata.getSchema()));
}
```
- [ ] Rename `MetadataRefreshEngine` to `MetaDataRefreshEngine`
- [ ] Split `SchemaAlteredEvent` into `TableAddedEvent` ,`TableAlteredEvent` and `TableDroppedEvent`
- [ ] Refactor `SchemaMetaDataRegistrySubscriber` to support partial update
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss closed issue #12492: Consider about refactor MetadataRefreshEngine
Posted by GitBox <gi...@apache.org>.
menghaoranss closed issue #12492:
URL: https://github.com/apache/shardingsphere/issues/12492
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #12492: Consider about refactor MetadataRefreshEngine
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #12492:
URL: https://github.com/apache/shardingsphere/issues/12492#issuecomment-930973654
The actual MetaData should be persisted, but `ShardingSphereSchema ` is the kernel MetaData, so the logic of refresher will be refactored, I close this issue now.
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org