kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5833) Reset thread interrupt state in case of InterruptedException
Date Sun, 10 Sep 2017 04:08:00 GMT

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

Ted Yu commented on KAFKA-5833:
-------------------------------

Call to Thread.interrupted() which is no-op should be checked in the following places:
{code}
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java:
               Thread.interrupted();
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:          
 Thread.interrupted();
connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java:             
  Thread.interrupted();
streams/src/test/java/org/apache/kafka/streams/perf/SimpleBenchmark.java:                Thread.interrupted();
{code}

> Reset thread interrupt state in case of InterruptedException
> ------------------------------------------------------------
>
>                 Key: KAFKA-5833
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5833
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Ted Yu
>              Labels: newbie++
>
> There are some places where InterruptedException is caught but thread interrupt state
is not reset.
> e.g. from WorkerSourceTask#execute() :
> {code}
>         } catch (InterruptedException e) {
>             // Ignore and allow to exit.
> {code}
> Proper way of handling InterruptedException is to reset thread interrupt state.



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

Mime
View raw message