[ https://issues.apache.org/jira/browse/KAFKA-3177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15214497#comment-15214497 ]
ASF GitHub Bot commented on KAFKA-3177: --------------------------------------- GitHub user hachikuji opened a pull request: https://github.com/apache/kafka/pull/1157 KAFKA-3177: log warning when topic/partition doesn't exist You can merge this pull request into a Git repository by running: $ git pull https://github.com/hachikuji/kafka KAFKA-3177 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1157.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1157 ---- commit 48b1f1fef29c5150c6deeffb3cf5fde3491fe888 Author: Jason Gustafson <ja...@confluent.io> Date: 2016-03-23T03:16:32Z KAFKA-3177: log warning when topic/partition doesn't exist ---- > Kafka consumer can hang when position() is called on a non-existing partition. > ------------------------------------------------------------------------------ > > Key: KAFKA-3177 > URL: https://issues.apache.org/jira/browse/KAFKA-3177 > Project: Kafka > Issue Type: Bug > Components: clients > Affects Versions: 0.9.0.0 > Reporter: Jiangjie Qin > Assignee: Jason Gustafson > Priority: Critical > Fix For: 0.10.1.0 > > > This can be easily reproduced as following: > {code} > { > ... > consumer.assign(SomeNonExsitingTopicParition); > consumer.position(); > ... > } > {code} > It seems when position is called we will try to do the following: > 1. Fetch committed offsets. > 2. If there is no committed offsets, try to reset offset using reset > strategy. in sendListOffsetRequest(), if the consumer does not know the > TopicPartition, it will refresh its metadata and retry. In this case, because > the partition does not exist, we fall in to the infinite loop of refreshing > topic metadata. > Another orthogonal issue is that if the topic in the above code piece does > not exist, position() call will actually create the topic due to the fact > that currently topic metadata request could automatically create the topic. > This is a known separate issue. -- This message was sent by Atlassian JIRA (v6.3.4#6332)