Rajini Sivaram created KAFKA-8662:
-------------------------------------

             Summary: Produce fails if a previous produce was to an 
unauthorized topic
                 Key: KAFKA-8662
                 URL: https://issues.apache.org/jira/browse/KAFKA-8662
             Project: Kafka
          Issue Type: Bug
          Components: producer 
    Affects Versions: 2.3.0
            Reporter: Rajini Sivaram
            Assignee: Rajini Sivaram
             Fix For: 2.4.0, 2.3.1


This is a regression introduced by the commit 
[https://github.com/apache/kafka/commit/460e46c3bb76a361d0706b263c03696005e12566|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.

 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to