Kirk True created KAFKA-16565:
---------------------------------

             Summary: IncrementalAssignmentConsumerEventHandler throws error 
when attempting to remove a partition that isn't assigned
                 Key: KAFKA-16565
                 URL: https://issues.apache.org/jira/browse/KAFKA-16565
             Project: Kafka
          Issue Type: Bug
          Components: clients, consumer, system tests
    Affects Versions: 3.8.0
            Reporter: Kirk True
             Fix For: 3.8.0


In {{{}verifiable_consumer.py{}}}, the Incremental

 
{code:java}
def handle_partitions_revoked(self, event):
    self.revoked_count += 1
    self.state = ConsumerState.Rebalancing
    self.position = {}
    for topic_partition in event["partitions"]:
        topic = topic_partition["topic"]
        partition = topic_partition["partition"]
        self.assignment.remove(TopicPartition(topic, partition))
 {code}
If the {{self.assignment.remove()}} call is passed a {{TopicPartition}} that 
isn't in the list, an error is thrown. For now, we should first check that the 
{{TopicPartition}} is in the list, and if not, log a warning or something.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to