findepi commented on code in PR #10691:
URL: https://github.com/apache/iceberg/pull/10691#discussion_r1676170877


##########
core/src/main/java/org/apache/iceberg/util/ParallelIterable.java:
##########
@@ -88,7 +91,18 @@ private ParallelIterator(
     @Override
     public void close() {
       // close first, avoid new task submit
-      this.closed = true;
+      this.closed.set(true);
+
+      for (Task<T> task : yieldedTasks) {
+        try {
+          task.close();
+        } catch (Exception e) {
+          throw new RuntimeException("Close failed", e);

Review Comment:
   > we may want to finish the close for loop in case of failure in the middle.
   
   good point, thanks!
   added `reliably attempt close on all yielded tasks` commit



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to