You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by tu...@apache.org on 2022/11/03 10:58:11 UTC
[shardingsphere] branch master updated: Modify SQLException to Exception for more chance to load metadata (#21933)
This is an automated email from the ASF dual-hosted git repository.
tuichenchuxin 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 a11d8734f31 Modify SQLException to Exception for more chance to load metadata (#21933)
a11d8734f31 is described below
commit a11d8734f315cdc24e01d7571354e609ce71fbc9
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Thu Nov 3 18:58:00 2022 +0800
Modify SQLException to Exception for more chance to load metadata (#21933)
* Modify SQLException to Exception for more chance to load metadata
* Modify SQLException to Exception for more chance to load metadata
* Modify SQLException to Exception for more chance to load metadata
---
.../metadata/database/schema/loader/SchemaMetaDataLoaderEngine.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/SchemaMetaDataLoaderEngine.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/SchemaMetaDataLoaderEngine.java
index e5620a74577..46085710942 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/SchemaMetaDataLoaderEngine.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/SchemaMetaDataLoaderEngine.java
@@ -80,7 +80,10 @@ public final class SchemaMetaDataLoaderEngine {
if (dialectSchemaMetaDataLoader.isPresent()) {
try {
return dialectSchemaMetaDataLoader.get().load(material.getDataSource(), material.getActualTableNames(), material.getDefaultSchemaName());
- } catch (final SQLException ex) {
+ // TODO replace Exception to SQLException when all dialect loader can handle metadata load normally
+ // CHECKSTYLE:OFF
+ } catch (final Exception ex) {
+ // CHECKSTYLE:ON
log.error("Dialect load schema meta data error.", ex);
}
}