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


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -245,14 +250,59 @@ public void close() throws IOException {
   }
 
   private void closeStream() throws IOException {
-    if (outputStream != null) {
+    if (outputStream == null) {
+      return;
+    }
+
+    Exception syncException = null;
+    try {
       // Persist all buffered data to DataNodes before closing so downstream
       // readers can observe a fully-written log file at commit-level 
visibility.
       sync();
-      outputStream.close();
-      outputStream = null;
-      closed = true;
+    } catch (IOException | RuntimeException e) {

Review Comment:
   Can we just use `Exception` here?



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