This is an automated email from the ASF dual-hosted git repository.

sewen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit e6798c3e40bffeccfc35c84021e63aae41a3ac48
Author: Stephan Ewen <[email protected]>
AuthorDate: Thu Sep 23 17:47:13 2021 +0200

    [FLINK-24366][runtime] Don't log error for failed task restore if the task 
is already canceled.
---
 .../streaming/api/operators/BackendRestorerProcedure.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BackendRestorerProcedure.java
 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BackendRestorerProcedure.java
index d15ed63..5a0cea9 100644
--- 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BackendRestorerProcedure.java
+++ 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BackendRestorerProcedure.java
@@ -137,6 +137,12 @@ public class BackendRestorerProcedure<T extends Closeable 
& Disposable, S extend
 
                 collectedException = ExceptionUtils.firstOrSuppressed(ex, 
collectedException);
 
+                if (backendCloseableRegistry.isClosed()) {
+                    throw new FlinkException(
+                            "Stopping restore attempts for already cancelled 
task.",
+                            collectedException);
+                }
+
                 LOG.warn(
                         "Exception while restoring {} from alternative 
({}/{}), will retry while more "
                                 + "alternatives are available.",
@@ -144,12 +150,6 @@ public class BackendRestorerProcedure<T extends Closeable 
& Disposable, S extend
                         alternativeIdx,
                         restoreOptions.size(),
                         ex);
-
-                if (backendCloseableRegistry.isClosed()) {
-                    throw new FlinkException(
-                            "Stopping restore attempts for already cancelled 
task.",
-                            collectedException);
-                }
             }
         }
 

Reply via email to