xushiyan commented on code in PR #6827:
URL: https://github.com/apache/hudi/pull/6827#discussion_r985062923
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java:
##########
@@ -557,8 +557,9 @@ public static Schema getLatestTableSchema(String path,
org.apache.hadoop.conf.Co
try {
HoodieTableMetaClient metaClient = StreamerUtil.createMetaClient(path,
hadoopConf);
return getTableAvroSchema(metaClient, false);
- } catch (Exception e) {
- LOG.warn("Error while resolving the latest table schema", e);
+ } catch (Throwable throwable) {
+ LOG.warn("Error while resolving the latest table schema.", throwable);
+ // ignored
}
Review Comment:
@TJX2014 then `getLatestTableSchema` should be fixed too. We don't catch
Throwable because Error should not be caught. Quote from javadoc
> An Error is a subclass of Throwable that indicates serious problems that a
reasonable application should not try to catch
So what is the strong reason to catch and ignore errors like OOM? You'd need
to fail loud in that case.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]