cshuo commented on code in PR #19503:
URL: https://github.com/apache/hudi/pull/19503#discussion_r3709271363


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/lookup/HoodieLookupTableReader.java:
##########
@@ -78,11 +88,32 @@ public RowData read(RowData reuse) throws IOException {
   }
 
   public void close() throws IOException {
-    if (this.inputFormat != null) {
-      inputFormat.close();
+    InputFormat format = this.inputFormat;
+    this.inputFormat = null;
+    this.inputSplits = null;
+    if (format == null) {
+      return;
+    }
+
+    IOException exception = null;
+    try {
+      format.close();
+    } catch (IOException e) {

Review Comment:
   `format.close()` can throw an unchecked `HoodieIOException` in the 
production COW path: `ParquetSplitRecordIterator.close()` converts its reader's 
`IOException` into that runtime exception. Since this catch handles only 
`IOException`, such a failure skips `closeInputFormat()`; it can also replace 
the original `open()` failure during rollback because the catch there likewise 
suppresses only checked close failures. Please preserve both checked and 
unchecked cleanup failures while still attempting the rich-format cleanup, and 
add a regression test using a runtime split-close failure.



-- 
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]

Reply via email to