You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jan Lukavský (JIRA)" <ji...@apache.org> on 2018/06/18 16:03:00 UTC
[jira] [Created] (KAFKA-7070) KafkaConsumer#committed might
unexpectedly shift consumer offset
Jan Lukavský created KAFKA-7070:
-----------------------------------
Summary: KafkaConsumer#committed might unexpectedly shift consumer offset
Key: KAFKA-7070
URL: https://issues.apache.org/jira/browse/KAFKA-7070
Project: Kafka
Issue Type: Bug
Components: clients
Affects Versions: 1.1.0
Reporter: Jan Lukavský
When client uses manual partition assignment (e.g. {{KafkaConsumer#assign}}), but then accidentally calls {{KafkaConsumer#committed}} (for whatever reason, most probably bug in user code), then the offset gets shifted to latest, possibly skipping any unconsumed messages, or producing duplicates. The reason is that the call to {{KafkaConsumer#committed}} invokes AbstractCoordinator, which tries to fetch committed offset, but doesn't find {{group.id}} (will be probably even empty). This might cause Fetcher to receive invalid offset for partition and reset it to the latest offset.
Although this is primarily bug in user code, it is very hard to track it down. The call to {{KafkaConsumer#committed}} might probably throw exception when called on client without auto partition assignment.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)