wwj6591812 commented on code in PR #9301:
URL: https://github.com/apache/paimon/pull/9301#discussion_r3818933356


##########
paimon-format/src/main/java/org/apache/paimon/format/blob/AbstractBlobElementWriter.java:
##########
@@ -263,27 +417,53 @@ private void write(byte[] bytes, int length) throws 
IOException {
     }
 
     private boolean shouldWriteNullOnFetchFailure(Throwable e) {
-        return writeNullOnFetchFailure && !HttpClientUtils.isNotFoundError(e);
+        return writeNullOnFetchFailure
+                && !isTaskCancellation(e)
+                && !HttpClientUtils.isNotFoundError(e);
+    }
+
+    private static boolean isTaskCancellation(Throwable failure) {
+        if (Thread.currentThread().isInterrupted()) {
+            return true;
+        }
+
+        Throwable current = failure;
+        while (current != null) {
+            if (current instanceof InterruptedException

Review Comment:
   Thanks, fixed. A plain `InterruptedIOException` is now recognized at the 
source-read catch point, so Paimon restores the thread interrupt before 
source/staging cleanup can replace the original failure. The check matches the 
exact base class, so timeout subclasses such as `SocketTimeoutException` remain 
eligible for the configured fetch fallback. I added regressions for both a 
cleared interrupt flag and a subsequent source-close failure, and kept the 
socket-timeout-to-NULL case covered.



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

Reply via email to