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

Kezhu Wang commented on FLINK-21821:
------------------------------------

Thanks for more context [~pnowojski]. After close look to current solution, I 
think my concern does not hold, at least for {{StreamTask.cancelables}}.

Ideally, 1c should make 1b unnecessary. But there are exceptions:
 # Buggy user code. FLINK-3595 was introduced for this.
 # Asynchronous background activities. {{StreamTask.cancelables}} involved as 
current from FLINK-3071, FLINK-3466.

Take {{BatchTask}} into account, I think {{cancelables}} should be in 
{{AbstractInvokable}}. But given its inactivity, I guess it does not worth for 
this alignment.

 So, basically, there is no more concern from my side.

> Clean up Task/StreamTask cancellation and remove unnecessary concurrency 
> -------------------------------------------------------------------------
>
>                 Key: FLINK-21821
>                 URL: https://issues.apache.org/jira/browse/FLINK-21821
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Network, Runtime / Task
>    Affects Versions: 1.13.0
>            Reporter: Kezhu Wang
>            Priority: Major
>
> I think {{AbstractInvokable.cancel}} should only do flag things but not 
> closing staff. Otherwise task canceler and task thread will contend on these 
> closing tasks.
> It is same for {{BatchTask.cancel}} which might be confirmed as one potential 
> cause for FLINK-21728.
> cc  [~dwysakowicz] [~roman_khachatryan] [~pnowojski] [~AHeise] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to