Stig Rohde Døssing created STORM-2850:
-----------------------------------------

             Summary: 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


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