flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject [5/8] flink git commit: [hotfix] Fix race condition in JobMaster#requestJobDetails
Date Wed, 28 Mar 2018 15:25:49 GMT
[hotfix] Fix race condition in JobMaster#requestJobDetails

Do not directly access executionGraph in another thread because it might be
altered.


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

Branch: refs/heads/release-1.5
Commit: eae610ddfc46a361c765522cbe4cbad45df50d59
Parents: 207a10c
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Tue Mar 27 08:00:48 2018 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Wed Mar 28 17:25:17 2018 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/flink/runtime/jobmaster/JobMaster.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/eae610dd/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
index d116f03..4313187 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
@@ -903,7 +903,8 @@ public class JobMaster extends FencedRpcEndpoint<JobMasterId> implements
JobMast
 
 	@Override
 	public CompletableFuture<JobDetails> requestJobDetails(@RpcTimeout Time timeout) {
-		return CompletableFuture.supplyAsync(() -> WebMonitorUtils.createDetailsForJob(executionGraph),
scheduledExecutorService);
+		final ExecutionGraph currentExecutionGraph = executionGraph;
+		return CompletableFuture.supplyAsync(() -> WebMonitorUtils.createDetailsForJob(currentExecutionGraph),
scheduledExecutorService);
 	}
 
 	@Override


Mime
View raw message