Beyondeclipse commented on pull request #10840:
URL: https://github.com/apache/shardingsphere/pull/10840#issuecomment-867321131
> Hi @totalo ,
>
> Thanks for your continued improvement. This PR looks fine with me, and we
can consider the following two points for the next PR,
>
> 1. Remove the stale `StandardMetaDataContexts ` constructor
> 2. Add a tableName field in `TableMetaData` wo avoid `Map<Map<String,
TableMetaData>, Map<String, TableMetaData>> build()`
>
> Also, @Beyondeclipse, do you think this PR has room to improve in #10911?
Could you give more explanation?
>
> @terrymanu , could you have a look at `ShardingSphereRulesBuilder.java` of
this PR, since I saw it involves your `todo` comment?
@tristaZero @totalo
I think bellows can be discussed:
1. The loading schema method "SchemaBuilder#build" may use
datasourceName/datasourceObject as filter key word to avoid duplicate loading
is better, while it uses tableNames now.
2. There 3 ways to load the schemas, and may be reduced or improved:
1) DialectTableMetaDataLoader based, multi-thread for specified
DatabaseType.
2) SchemaMetaDataLoader.loadAllTableNames, which use
Connection.getMetaData to load, single-thread.
3) TableMetaDataBuilder.load, which use Connection.getMetaData to load
too.
And I am confused about these :
a. What is the difference between 2) and 3) loading methods? Can one
replace the other?
b. Why 3) use multi-thread to load one tableName in all the datasources?
It seems not to be effective. (see ShardingTableMetaDataBuilder implements
RuleBasedTableMetaDataBuilder)
--
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]