You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "huxihx (JIRA)" <ji...@apache.org> on 2019/02/22 08:22:00 UTC
[jira] [Assigned] (KAFKA-7962) StickyAssignor: throws
NullPointerException during assignments if topic is deleted
[ https://issues.apache.org/jira/browse/KAFKA-7962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
huxihx reassigned KAFKA-7962:
-----------------------------
Assignee: huxihx
> StickyAssignor: throws NullPointerException during assignments if topic is deleted
> ----------------------------------------------------------------------------------
>
> Key: KAFKA-7962
> URL: https://issues.apache.org/jira/browse/KAFKA-7962
> Project: Kafka
> Issue Type: Bug
> Components: consumer
> Affects Versions: 2.1.0
> Environment: 1. MacOS, com.salesforce.kafka.test.KafkaTestUtils (kind of embedded kafka integration tests)
> 2. Linux, dockerised kafka and our service
> Reporter: Oleg Smirnov
> Assignee: huxihx
> Priority: Major
> Attachments: NPE-StickyAssignor-issues.apache.log
>
>
> Integration tests with com.salesforce.kafka.test.KafkaTestUtils, local setup, StickyAssignor used, local topics are created / removed, one topic is created in the beginning of test and without unsubscribing from it - deleted.
> Same happens in real environment.
>
> # have single "topic" with 1 partition
> # single consumer subscribed to this "topic" (StickyAssignor)
> # delete "topic"
> =>
> * rebalance starts, topic partition(s) is revoked
> * on assignment StickyAssignor throws exception (line 223), because partitionsPerTopic.("topic") returns null in for loop (topic deleted - no partitions are present)
>
> In the provided log part, tearDown() causes topic deletion, while consumer still running and tries to poll data from topic.
> RangeAssignor works fine (revokes partition, assigns empty set).
> Problem doesn't have workaround (like handle i in onPartitionsAssigned and remove unsubscribe topic), because everything happens before listener called.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)