huaxingao commented on code in PR #18213:
URL: https://github.com/apache/iceberg/pull/18213#discussion_r4085073646


##########
core/src/main/java/org/apache/iceberg/util/Tasks.java:
##########
@@ -470,6 +479,21 @@ private <E extends Exception> void 
runTaskWithRetry(Task<I, E> task, I item) thr
     }
   }
 
+  private static boolean causedByInterruption(Throwable throwable) {
+    Throwable current = throwable;
+    while (current != null) {
+      if (current instanceof InterruptedException
+          || current instanceof InterruptedIOException
+          || current instanceof ClosedByInterruptException) {
+        return true;
+      }
+
+      current = current.getCause() != current ? current.getCause() : null;

Review Comment:
   Simplified. 



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