This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 1603ed1 Fix the ExecutorService does not shutdown when loading table
meta data failed. (#11479)
1603ed1 is described below
commit 1603ed1ecd3905071ea14f4d601def6424f25e53
Author: sccc803 <[email protected]>
AuthorDate: Sat Jul 24 18:10:57 2021 +0800
Fix the ExecutorService does not shutdown when loading table meta data
failed. (#11479)
Co-authored-by: sccc <[email protected]>
---
.../shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java | 1 +
1 file changed, 1 insertion(+)
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java
index fad3fce..f30a587 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java
@@ -98,6 +98,7 @@ public final class ShardingTableMetaDataBuilder implements
RuleBasedTableMetaDat
try {
getTableMetaData(value).ifPresent(tableMetaData ->
result.put(key, tableMetaData));
} catch (final InterruptedException | ExecutionException |
TimeoutException ex) {
+ executorService.shutdownNow();
throw new IllegalStateException(String.format("Error while
fetching tableMetaData with key= %s and Value=%s", key, value), ex);
}
});