viktorsomogyi commented on PR #13975:
URL: https://github.com/apache/kafka/pull/13975#issuecomment-1641908924

   @mumrah correct, the problem happens because the broker doesn't have a 
populated metadata cache and it tries to auto-create a topic during a topic 
metadata request (and it might be that this topic otherwise already exists). 
The PR is trying to fix this problem too. I thought I'd put the solution to 
ZkAdminManager so that it's not too different from the KRaft solution as there 
the broker would forward a topic creation request to the controller and return 
`UNKNOWN_TOPIC_OR_PARTITION` to the client.
   
   It's important to note that this isn't the first metadata request that the 
consumer in the herder sends out but a subsequent one, so it had some 
connection to a valid broker but lost it and reconnected to another one which 
was just starting up and didn't have metadata.
   
   In the Jira description I used a single broker because it was easier to 
reproduce it that way but it can be reproduced in a multi-broker environment 
too of course. I didn't really consider how would the controller affect things 
here because as you say they start accepting requests before having metadata.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to