未验证 提交 43df98f9 编写于 作者: L Liang Zhang 提交者: GitHub

Revert "adjust threadpool size in asyncLoad (#4828)" (#4831)

This reverts commit c5ee00bf.
上级 c5ee00bf
......@@ -101,7 +101,7 @@ public final class SchemaMetaDataLoader {
private static Map<String, TableMetaData> asyncLoad(final DataSource dataSource,
final int maxConnectionCount, final List<String> tableNames, final List<List<String>> tableGroups) throws SQLException {
Map<String, TableMetaData> result = new ConcurrentHashMap<>(tableNames.size(), 1);
ExecutorService executorService = Executors.newFixedThreadPool(Math.min(tableGroups.size(), maxConnectionCount));
ExecutorService executorService = Executors.newFixedThreadPool(maxConnectionCount);
Collection<Future<Map<String, TableMetaData>>> futures = new LinkedList<>();
for (List<String> each : tableGroups) {
futures.add(executorService.submit(() -> load(dataSource.getConnection(), each)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册