You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2017/09/28 11:11:37 UTC

[2/4] flink git commit: [FLINK-7659] Fix unprotected access to inProgress in JobCancellationWithSavepointHandlers#handleNewRequest

[FLINK-7659] Fix unprotected access to inProgress in JobCancellationWithSavepointHandlers#handleNewRequest

This closes #4703.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/426a81cb
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/426a81cb
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/426a81cb

Branch: refs/heads/release-1.3
Commit: 426a81cb2f77c4bf58f1c3639013231778634cf8
Parents: 88ad15b
Author: Bowen Li <bo...@gmail.com>
Authored: Thu Sep 21 22:33:17 2017 -0700
Committer: zentol <ch...@apache.org>
Committed: Thu Sep 28 13:07:31 2017 +0200

----------------------------------------------------------------------
 .../handlers/JobCancellationWithSavepointHandlers.java           | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/426a81cb/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobCancellationWithSavepointHandlers.java
----------------------------------------------------------------------
diff --git a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobCancellationWithSavepointHandlers.java b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobCancellationWithSavepointHandlers.java
index f8ab884..c95bcbb 100644
--- a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobCancellationWithSavepointHandlers.java
+++ b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobCancellationWithSavepointHandlers.java
@@ -221,7 +221,9 @@ public class JobCancellationWithSavepointHandlers {
 										completed.put(requestId, failure);
 									}
 								} finally {
-									inProgress.remove(jobId);
+									synchronized (lock) {
+										inProgress.remove(jobId);
+									}
 								}
 							}
 						}