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

yufeng.chen commented on STORM-2184:
------------------------------------

hi, Stig Rohde
I think the KafkaConsumer wakeup and close should be done when commit offsets 
success, and the commit offset is sync, and commitSync can have a callback, the 
KafkaConsumer wakeup and close can handed in callback. 

> New Kafka spout may fail to commit offsets on shutdown if polling thread is 
> not blocked in poll when KafkaConsumer.wakeup is called
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: STORM-2184
>                 URL: https://issues.apache.org/jira/browse/STORM-2184
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: Stig Rohde Døssing
>            Assignee: Stig Rohde Døssing
>            Priority: Trivial
>
> If a thread is blocking in one of a number of calls to KafkaConsumer and 
> wakeup is called, the thread will throw WakeupException. If there is no such 
> thread, the next call to one of the blocking methods will throw 
> WakeupException instead.
> The spout currently calls wakeup, then attempts to commit offsets to Kafka 
> when shutting down. If there was no other thread to wake up (e.g. the async 
> loop thread was doing something other than hanging in KakfaConsumer.poll), 
> the call to KafkaConsumer.commitSync from the closing thread will throw 
> WakeupException.
> The thread running KafkaSpout.close shouldn't be interrupting itself, and 
> should ignore WakeupExceptions when committing offsets.



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

Reply via email to