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

Stephan Ewen commented on FLINK-2040:
-------------------------------------

The cause is the following:

It may be (very rarely) that the following race happens:
  - OUTSIDE THREAD: call to cancel()
  - OUTSIDE THREAD: atomic state change from running to canceling
  - TASK THREAD: finishes, atomic change from canceling to canceled
  - TASK THREAD: send notification that state is canceled
  - OUTSIDE THREAD: send notification that state is canceling

In that case, the CANCELED notification comes before the CANCELING notification.

The execution graph state machine accepts this, so it is actually okay for the 
system if that happens.

I'll adjust the tests to tolerate that as well.

> TaskTest.testCancelDuringInvoke:434->validateListenerMessage:712 
> expected:<CANCELING> but was:<CANCELED>
> --------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-2040
>                 URL: https://issues.apache.org/jira/browse/FLINK-2040
>             Project: Flink
>          Issue Type: Bug
>          Components: TaskManager
>    Affects Versions: 0.9
>            Reporter: Robert Metzger
>
> Looks like an unstable test 
> https://travis-ci.org/rmetzger/flink/jobs/63016938



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to