[ https://issues.apache.org/jira/browse/FLINK-7804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401579#comment-16401579 ]
ASF GitHub Bot commented on FLINK-7804: --------------------------------------- Github user GJL commented on a diff in the pull request: https://github.com/apache/flink/pull/5675#discussion_r175020983 --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java --- @@ -395,10 +405,13 @@ public void onNodesUpdated(List<NodeReport> list) { @Override public void onError(Throwable error) { - onFatalError(error); + runAsync(() -> onFatalError(error)); --- End diff -- done > YarnResourceManager does not execute AMRMClientAsync callbacks in main thread > ----------------------------------------------------------------------------- > > Key: FLINK-7804 > URL: https://issues.apache.org/jira/browse/FLINK-7804 > Project: Flink > Issue Type: Bug > Components: Distributed Coordination, YARN > Affects Versions: 1.4.0, 1.5.0 > Reporter: Till Rohrmann > Assignee: Gary Yao > Priority: Blocker > Labels: flip-6 > Fix For: 1.5.0 > > > The {{YarnResourceManager}} registers callbacks at a {{AMRMClientAsync}} > which it uses to react to Yarn container allocations. These callbacks (e.g. > {{onContainersAllocated}} modify the internal state of the > {{YarnResourceManager}}. This can lead to race conditions with the > {{requestYarnContainer}} method. > In order to solve this problem we have to execute the state changing > operations in the main thread of the {{YarnResourceManager}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)