Description
This is a regression introduced by the commit https://github.com/apache/kafka/commit/460e46c3bb76a361d0706b263c03696005e12566.
When we produce to a topic, was add the topic to the producer's Metadata instance. If metadata authorization fails for the topic, we fail the send and propagate the authorization exception to the caller. The topic remains in the Metadata instance. We expire the topic and remove from Metadata after a fixed interval of 5 minutes. This has been the case for a while.
If a subsequent send is to a different authorized topic, we may still get metadata authorization failures for the previous unauthorized topic that is still in Metadata. Prior to that commit in 2.3.0, send to authorized topics completed successfully even if there were other unauthorized or invalid topics in the Metadata. Now, we propagate the exceptions without checking topic. This is a regression and not the expected behaviour since producer becomes unusable for 5 minutes unless authorization is granted to the first topic.
Attachments
Issue Links
- links to