You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "mingleizhang (JIRA)" <ji...@apache.org> on 2017/04/17 07:14:41 UTC

[jira] [Commented] (FLINK-5943) Unprotected access to haServices in YarnFlinkApplicationMasterRunner#shutdown()

    [ https://issues.apache.org/jira/browse/FLINK-5943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970759#comment-15970759 ] 

mingleizhang commented on FLINK-5943:
-------------------------------------

[~tedyu] Hi, Ted, How do you think of this ? I have put what access to haSerivices inside of the synchronized block.Thanks. 
{code}
protected void shutdown(ApplicationStatus status, String msg) {
	synchronized (lock) {
		// Need to clear the job state in the HA services before shutdown
		try {
			haServices.getRunningJobsRegistry().clearJob(jobGraph.getJobID());
		}
		catch (Throwable t) {
		        LOG.warn("Could not clear the job at the high-availability services", t);
		}
		if (jobManagerRunner != null) {
		try {
			jobManagerRunner.shutdown();
		} catch (Throwable tt) {
			LOG.warn("Failed to stop the JobManagerRunner", tt);
		}
	}
{code}

> Unprotected access to haServices in YarnFlinkApplicationMasterRunner#shutdown()
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-5943
>                 URL: https://issues.apache.org/jira/browse/FLINK-5943
>             Project: Flink
>          Issue Type: Bug
>          Components: YARN
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>   protected void shutdown(ApplicationStatus status, String msg) {
>     // Need to clear the job state in the HA services before shutdown
>     try {
>       haServices.getRunningJobsRegistry().clearJob(jobGraph.getJobID());
>     }
> {code}
> The access to haServices is without lock protection.
> haServices may have been closed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)