You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Stig Rohde Døssing (JIRA)" <ji...@apache.org> on 2017/12/08 08:24:00 UTC

[jira] [Created] (STORM-2850) ManualPartitionSubscription assigns new partitions before calling onPartitionsRevoked

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)