You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jinzhong Li (Jira)" <ji...@apache.org> on 2024/03/27 12:53:00 UTC

[jira] [Commented] (FLINK-34670) The asyncOperationsThreadPool in SubtaskCheckpointCoordinatorImpl can only create one worker thread

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

Jinzhong Li commented on FLINK-34670:
-------------------------------------

[~roman]    [~pnowojski]  I think this is a critical bug that will result in concurrent checkpoints being forced to execute sequentially, as well as causing a drastic performance regression of checkpoint aborts. Could you please take a look at it?

> The asyncOperationsThreadPool in SubtaskCheckpointCoordinatorImpl can only create one worker thread
> ---------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-34670
>                 URL: https://issues.apache.org/jira/browse/FLINK-34670
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Checkpointing, Runtime / State Backends
>    Affects Versions: 1.18.0, 1.19.0
>            Reporter: Jinzhong Li
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 1.20.0
>
>         Attachments: image-2024-03-14-20-24-14-198.png, image-2024-03-14-20-27-37-540.png, image-2024-03-14-20-33-28-851.png
>
>
> Now, the asyncOperations ThreadPoolExecutor of SubtaskCheckpointCoordinatorImpl is create with a LinkedBlockingQueue and zero corePoolSize.
> !image-2024-03-14-20-24-14-198.png|width=614,height=198!
> And in the ThreadPoolExecutor, except for the first time the task is submitted, *no* new thread is created until the queue is full. But the capacity of LinkedBlockingQueue is Integer.Max. This means that there is almost *only one thread* working in this thread pool, *even if* {*}there are many concurrent checkpoint requests or checkpoint abort requests waiting to be processed{*}.
> !image-2024-03-14-20-27-37-540.png|width=614,height=175!
> This problem can be verified by changing ExecutorService implementation in UT 
> SubtaskCheckpointCoordinatorTest#testNotifyCheckpointAbortedDuringAsyncPhase. When the LinkedBlockingQueue and zero corePoolSize are configured, this UT will deadlock because only one worker thread can be created.
> !image-2024-03-14-20-33-28-851.png|width=606,height=235!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)