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

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

GitHub user srdo opened a pull request:

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

    KAFKA-4375: Reset thread interrupted state in a few places where Inte…

    …rruptedException is caught in a thread Kafka didn't start.
    
    See https://issues.apache.org/jira/browse/KAFKA-4375

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

    $ git pull https://github.com/srdo/kafka KAFKA-4375

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

    https://github.com/apache/kafka/pull/2100.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 #2100
    
----
commit f2fa7a09f0bb29b4c4245449714c9e0e2cda73be
Author: Stig Rohde Døssing <s...@it-minds.dk>
Date:   2016-11-03T21:45:36Z

    KAFKA-4375: Reset thread interrupted state in a few places where 
InterruptedException is caught in a thread Kafka didn't start

----


> Kafka consumer may swallow some interrupts meant for the calling thread
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-4375
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4375
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>            Reporter: Stig Rohde Døssing
>
> Apache Storm has added a new data source ("spout") based on the Kafka 0.9 
> consumer. Storm interacts with the consumer by having one thread per spout 
> instance loop calls to poll/commitSync etc. When Storm shuts down, another 
> thread indicates that the looping threads should shut down by interrupting 
> them, and joining them.
> If one of the looping threads happen to be interrupted while executing 
> certain sleeps in some consumer methods (commitSync and committed at least), 
> the interrupt can be lost because they contain a call to SystemTime.sleep, 
> which swallows the interrupt.
> Is this behavior by design, or can SystemTime be changed to reset the thread 
> interrupt flag when catching an InterruptedException? 
> I haven't checked the rest of the client code, so it's possible that this is 
> an issue in other parts of the code too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to