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
- 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.