fanruan-tuco commented on code in PR #18522:
URL: https://github.com/apache/iceberg/pull/18522#discussion_r4399911212


##########
core/src/main/java/org/apache/iceberg/util/ParallelIterable.java:
##########
@@ -208,14 +227,18 @@ public synchronized boolean hasNext() {
 
       // this cannot conclude that there are no more records until tasks have 
finished. while some
       // are running, return true when there is at least one item to return.
-      while (checkTasks()) {
+      while (true) {
+        taskSignal.drainPermits();

Review Comment:
   Good catch. My tests not covered ``` taskSignal.drainPermits();```. I’ll add 
this case and a comment explaining the ordering.



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