kafka-jira 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] (KAFKA-5665) Incorrect interruption invoking method used for Heartbeat thread
Date Fri, 04 Aug 2017 03:28:00 GMT

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

ASF GitHub Bot commented on KAFKA-5665:
---------------------------------------

Github user huxihx closed the pull request at:

    https://github.com/apache/kafka/pull/3586


> Incorrect interruption invoking method used for Heartbeat thread 
> -----------------------------------------------------------------
>
>                 Key: KAFKA-5665
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5665
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer
>    Affects Versions: 0.11.0.0
>            Reporter: huxihx
>            Assignee: huxihx
>            Priority: Minor
>
> When interrupting the background heartbeat thread, `Thread.interrupted();` is used. Actually,
`Thread.currentThread().interrupt();` should be used to restore the interruption status. An
alternative way to solve is to remove `Thread.interrupted();` since HeartbeatThread extends
Thread and all code higher up on the call stack is controlled, so we could safely swallow
this exception. Anyway, `Thread.interrupted();`  should not be used here. It's a test method
not an action.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message