flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9776) Interrupt TaskThread only while in User/Operator code
Date Fri, 06 Jul 2018 12:15:00 GMT

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

ASF GitHub Bot commented on FLINK-9776:
---------------------------------------

GitHub user StephanEwen opened a pull request:

    https://github.com/apache/flink/pull/6275

    [FLINK-9776] [runtime] Stop sending periodic interrupts once executing thread leaves user
function / operator code.

    ## What is the purpose of the change
    
    Upon cancellation, the task thread is periodically interrupted. This helps to pull the
thread out of blocking operations in the user code.
    
    However, once the thread leaves the user code, the repeated interrupts may interfere with
the shutdown cleanup logic, causing confusing exceptions.
    
    This PR changes the behavior to stop sending the periodic interrupts once the thread leaves
the user code.
    
    ## Brief change log
    
      - `AbstractInvokable` maintains a flag whether interrupts should be sent.
      - `StreamTask` sets to not receive interrupts after coming out of the user code
    
    ## Verifying this change
    
    This change is a trivial rework that currently only avoids  throwing and catching of InterruptedExceptions
that may cause noise in the logs.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): **no**
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no**
      - The serializers: **no**
      - The runtime per-record code paths (performance sensitive): **no**
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing,
Yarn/Mesos, ZooKeeper: **no**
      - The S3 file system connector: **no**
    
    ## Documentation
    
      - Does this pull request introduce a new feature? **no**
      - If yes, how is the feature documented? **not applicable**


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/StephanEwen/incubator-flink stop_interrupts

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6275.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6275
    
----
commit 73d31551574f3c18e4cbc079681ed93f9ec2ef34
Author: Stephan Ewen <sewen@...>
Date:   2018-07-06T11:34:27Z

    [FLINK-9776] [runtime] Stop sending periodic interrupts once executing thread leaves user
function / operator code.

----


> Interrupt TaskThread only while in User/Operator code
> -----------------------------------------------------
>
>                 Key: FLINK-9776
>                 URL: https://issues.apache.org/jira/browse/FLINK-9776
>             Project: Flink
>          Issue Type: Improvement
>          Components: Local Runtime
>            Reporter: Stephan Ewen
>            Assignee: Stephan Ewen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.6.0
>
>
> Upon cancellation, the task thread is periodically interrupted.
> This helps to pull the thread out of blocking operations in the user code.
> Once the thread leaves the user code, the repeated interrupts may interfere with the
shutdown cleanup logic, causing confusing exceptions.
> We should stop sending the periodic interrupts once the thread leaves the user code.



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

Mime
View raw message