[
https://issues.apache.org/jira/browse/FLINK-23862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17405142#comment-17405142
]
Roman Khachatryan edited comment on FLINK-23862 at 8/26/21, 10:55 AM:
----------------------------------------------------------------------
Fix merged into master (1.14) as
285b2c12d5a5673f4d041229e751b81e5581d370..a8ea3c3e81517f9c38f90b82c043136d8b56bf8b.
was (Author: roman_khachatryan):
Fix merged into master (1.14) as a8ea3c3e81517f9c38f90b82c043136d8b56bf8b.
> Race condition while cancelling task during initialization
> ----------------------------------------------------------
>
> Key: FLINK-23862
> URL: https://issues.apache.org/jira/browse/FLINK-23862
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Task
> Affects Versions: 1.14.0
> Reporter: Roman Khachatryan
> Assignee: Roman Khachatryan
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.14.0
>
>
> While debugging the recent failures in FLINK-22889, I see that sometimes the
> operator chain is not closed if the task is cancelled while it's being
> initialized.
>
> The reason is that on restore(), cleanUpInvoke() is only closed if there was
> an exception, including CancelTaskException.
> The latter is only thrown if StreamTask.canceled is set, i.e. TaskCanceler
> has called StreamTask.cancel().
>
> So if StreamTask is cancelled in between restore and normal invoke then it
> may not close the operator chain and not do other cleanup.
>
> One solution is to make StreamTask.cleanup visible to and called from Task.
>
> cc: [~akalashnikov], [~pnowojski]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)