Guosmilesmile commented on code in PR #14197:
URL: https://github.com/apache/iceberg/pull/14197#discussion_r2392041495


##########
core/src/main/java/org/apache/iceberg/io/BaseTaskWriter.java:
##########
@@ -257,6 +277,21 @@ public void close() throws IOException {
             posDeleteWriter = null;
           }
         }
+
+        // Add the completed dvs files.
+        if (dvFileWriter != null) {
+          try {
+            // complete will call close
+            if (!dvFileWriter.closed()) {
+              dvFileWriter.close();

Review Comment:
   @pvary I've made some changes regarding this issue:
   
   1. The `BaseTaskWriter` in the core layer has reverted to the regular DV 
cleanup logic and retained the overridable methods.
   
   2. The `BaseDeltaTaskWriter` in the Flink layer has two implementations, for 
non-partitioned and partitioned scenarios respectively. Since there can be 
multiple `RowDataDeltaWriter` instances and shared DV writers here, so I've 
handled the closing of the DV writer in this class to ensure there are no 
concurrency issues.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to