You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/07/24 10:11:24 UTC
[shardingsphere] branch master updated: Fix the ExecutorService
does not shutdown when loading table meta data failed. (#11479)
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 <43...@users.noreply.github.com>
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 <sc...@gmail.com>
---
.../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);
}
});