[ https://issues.apache.org/jira/browse/KAFKA-7961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Gustafson updated KAFKA-7961: ----------------------------------- Component/s: consumer > Handle subscription changes with a rebalance in progress > -------------------------------------------------------- > > Key: KAFKA-7961 > URL: https://issues.apache.org/jira/browse/KAFKA-7961 > Project: Kafka > Issue Type: Bug > Components: consumer > Reporter: Jason Gustafson > Assignee: Jose Armando Garcia Sancio > Priority: Major > Fix For: 2.3.0 > > > Due to wakeups or poll timeouts, it is possible to have a subscription > changed while a rebalance is in progress. This can lead to an illegal state > error such as the following if some of the assigned partitions no longer > match the subscription: > {code} > java.lang.IllegalArgumentException: Assigned partition foo-0 for > non-subscribed topic; subscription is [bar] > at > org.apache.kafka.clients.consumer.internals.SubscriptionState.assignFromSubscribed(SubscriptionState.java:192) > at > org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.onJoinComplete(ConsumerCoordinator.java:249) > at > org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:410) > at > org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:344) > at > org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:344) > at > org.apache.kafka.clients.consumer.KafkaConsumer.updateAssignmentMetadataIfNeeded(KafkaConsumer.java:1226) > at > org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1191) > at > org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1176) > {code} > Rather than requiring the assignment received from a rebalance to match the > subscription, we should just request a rebalance. -- This message was sent by Atlassian JIRA (v7.6.3#76005)