You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sr...@apache.org on 2018/05/17 08:06:53 UTC
[2/7] flink git commit: [hotfix] Abort restore when the procedure
failed through with a closed CloseableRegistry
[hotfix] Abort restore when the procedure failed through with a closed CloseableRegistry
This prevents that exceptions from cancellation through the CloseableRegistry will result in
unnecessary recovery attemps with alternative state.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/a7b54f12
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/a7b54f12
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/a7b54f12
Branch: refs/heads/master
Commit: a7b54f12c96bf03fd87b4cf03127f0838e746695
Parents: 85eb104
Author: Stefan Richter <s....@data-artisans.com>
Authored: Mon Mar 12 22:43:47 2018 +0100
Committer: Stefan Richter <s....@data-artisans.com>
Committed: Thu May 17 10:03:03 2018 +0200
----------------------------------------------------------------------
.../flink/streaming/api/operators/BackendRestorerProcedure.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/a7b54f12/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/BackendRestorerProcedure.java
----------------------------------------------------------------------
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 dd75fb2..0f5b0e0 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
@@ -125,6 +125,10 @@ public class BackendRestorerProcedure<
LOG.warn("Exception while restoring {} from alternative ({}/{}), will retry while more " +
"alternatives are available.", logDescription, alternativeIdx, restoreOptions.size(), ex);
+
+ if (backendCloseableRegistry.isClosed()) {
+ throw new FlinkException("Stopping restore attempts for already cancelled task.", collectedException);
+ }
}
}