You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/10/01 07:17:57 UTC

[GitHub] [hudi] xushiyan commented on a diff in pull request #6827: [HUDI-4950] Fix read log lead to oom not be catched issue

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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org