[
https://issues.apache.org/jira/browse/KAFKA-20040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lianet Magrans updated KAFKA-20040:
-----------------------------------
Fix Version/s: 4.2.0
> Race condition on consumer updating positions and unsubscribe when using
> committed offsets with topic ID
> --------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-20040
> URL: https://issues.apache.org/jira/browse/KAFKA-20040
> Project: Kafka
> Issue Type: Bug
> Components: clients, consumer
> Reporter: Lianet Magrans
> Assignee: Lianet Magrans
> Priority: Major
> Fix For: 4.2.0
>
>
> When using topic IDs for fetching committed offsets (as of 4.2), there could
> be a race where a consumer requests offsets to update positions, but
> unsubscribes from it before receiving a response. In that case, the response
> to the OffsetFetch will contain a topic ID that the consumer cannot resolve
> from metadata. Currently the OffsetFetch response handling fails with:
>
> {code:java}
> Error fetching committed offsets to update positions
> (org.apache.kafka.clients.consumer.internals.OffsetsRequestManager:424)
> org.apache.kafka.common.KafkaException: Topic does not exist
> {code}
>
> Note that this would never be the case of manual calls to fetch offsets
> (consumer.committed). That API directly adds the topics to metadata as
> transient topics, and keeps them until a response is received.
>
> Flaky test that revealed the issue :
> [https://develocity.apache.org/s/wblkn37zseyig/tests/task/:core:test/details/kafka.api.PlaintextConsumerAssignorsTest/testRemoteAssignorRange(String)%5B1%5D?top-execution=1]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)