[ 
https://issues.apache.org/jira/browse/STORM-2850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stig Rohde Døssing updated STORM-2850:
--------------------------------------
    Fix Version/s: 1.2.0

> ManualPartitionSubscription assigns new partitions before calling 
> onPartitionsRevoked
> -------------------------------------------------------------------------------------
>
>                 Key: STORM-2850
>                 URL: https://issues.apache.org/jira/browse/STORM-2850
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-kafka-client
>    Affects Versions: 2.0.0, 1.2.0
>            Reporter: Stig Rohde Døssing
>            Assignee: Stig Rohde Døssing
>              Labels: pull-request-available
>             Fix For: 2.0.0, 1.2.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> ManualPartitionSubscription does partition assignment updates in the wrong 
> order. It calls KafkaConsumer.assign, then onPartitionsRevoked and last 
> onPartitionsAssigned. The order should be onPartitionsRevoked, then assign, 
> then onPartitionsAssigned.
> onPartitionsRevoked has to be called before we reassign partitions, because 
> we try to commit offsets for the revoked partitions. If we try to commit to a 
> partition the consumer is not assigned, it will throw an exception. The 
> onRevoke, assign, onAssign order is also more in line with the javadoc for 
> ConsumerRebalanceListener, which specifies that onRevoke should be called 
> before the partition rebalance begins.



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

Reply via email to