[
https://issues.apache.org/jira/browse/KAFKA-14313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colin McCabe resolved KAFKA-14313.
----------------------------------
Resolution: Won't Fix
This isn't a bug. It results from metadata propagation delays. The client needs
to retry NOT_LEADER_FOR_TOPIC_OR_PARTITION until the topic is created on the
leader in question.
> Kraft: immediately producing to new topics occasionally returns
> NOT_LEADER_FOR_PARTITION
> ----------------------------------------------------------------------------------------
>
> Key: KAFKA-14313
> URL: https://issues.apache.org/jira/browse/KAFKA-14313
> Project: Kafka
> Issue Type: Bug
> Components: kraft, producer
> Reporter: Travis Bischel
> Priority: Major
>
> Related issue: KAFKA-14312
> See the related issue for the full problem description. This issue is to
> track a _slightly_ less important issue.
> In Kraft mode, if I create a topic, sometimes immediate produce requests are
> rejected with NOT_LEADER_FOR_PARTITION
>
> Scenario:
> * Client creates topic
> * Client loads metadata for topic, receives leader 1
> * Client produces to broker 1
> * Client receives NOT_LEADER_FOR_PARTITION
> If the client waits a little bit, the broker eventually does become the
> leader.
> The above is tested in a 1 broker scenario; my docker-compose.yaml is in the
> linked ticket.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)