Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-8662

Produce fails if a previous produce was to an unauthorized topic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0, 2.3.1
    • producer
    • None

    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

          Activity

            People

              rsivaram Rajini Sivaram
              rsivaram Rajini Sivaram
              Jason Gustafson Jason Gustafson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: