You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Till Rohrmann (JIRA)" <ji...@apache.org> on 2019/07/03 14:37:00 UTC

[jira] [Commented] (FLINK-12926) Main thread checking in some tests fails

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

Till Rohrmann commented on FLINK-12926:
---------------------------------------

Thanks for opening this issue [~zhuzh]. Just for clarification purposes, is this a current problem or do you observe these problems if you try to run actions on the {{ExecutionGraph}} from a different thread?

The mentioned tests have the assumption that no other concurrent operations are being triggered by these tests. That's why these tests use the {{TestingComponentMainThreadExecutorServiceAdapter#forMainThread}}. Once this assumption is no longer true, e.g. changing the behaviour to schedule other operations, then these tests need to be adapted.

Given this, I would not see this as a separate issue. Instead, these changes should be applied as part of the issue which changes the behaviour. If you agree, then we can close this issue.

> Main thread checking in some tests fails
> ----------------------------------------
>
>                 Key: FLINK-12926
>                 URL: https://issues.apache.org/jira/browse/FLINK-12926
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination, Tests
>    Affects Versions: 1.9.0
>            Reporter: Zhu Zhu
>            Priority: Major
>         Attachments: mainThreadCheckFailure.log
>
>
> Currently all JM side job changing actions are expected to be taken in JobMaster main thread.
> In current Flink tests, many cases tend to use the test main thread as the JM main thread. This can lead to 2 issues:
> 1. TestingComponentMainThreadExecutorServiceAdapter is a direct executor, so if it is invoked from any other thread, it will break the main thread checking and fail the submitted action (as in the attached log [^mainThreadCheckFailure.log])
> 2. The test main thread does not support other actions queued in its executor, as the test will end once the current test thread action(the current running test body) is done
>  
> In my observation, most cases which starts ExecutionGraph.scheduleForExecution() will encounter this issue. Cases include ExecutionGraphRestartTest, FailoverRegionTest, ConcurrentFailoverStrategyExecutionGraphTest, GlobalModVersionTest, ExecutionGraphDeploymentTest, etc.
>  
> One solution in my mind is to create a ScheduledExecutorService for those tests, use it as the main thread and run the test body in this thread.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)