singhpk234 commented on code in PR #14824:
URL: https://github.com/apache/iceberg/pull/14824#discussion_r2616514491


##########
core/src/main/java/org/apache/iceberg/rest/ScanTaskIterable.java:
##########
@@ -137,16 +131,50 @@ public void run() {
 
       } catch (InterruptedException e) {
         Thread.currentThread().interrupt();
+        failure.compareAndSet(null, new RuntimeException("PlanWorker was 
interrupted", e));

Review Comment:
   > The loop condition should already handle the case of exiting when the 
thread is interrupted
   
   This interrupted exception is thrown outside the loop essentially a catch to 
try which has the loop so outside the loop 
   
   > If we set the failure on interruption, a consumer thread is going to blow 
up
   
   I agree, but do we not wanna report to consumer that producer has failed 
during production essentially planning has encountered exception ? becuase if 
we just mark shutdown to true, hasNext() returns false and the consumer might 
just think its done consuming all the stuff hence wanted to bubble it up
   
   WDYT ? 
   



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