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

Race condition when creating topics and changing their configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.4.0
    • None
    • None

    Description

      In Partition.createLog we do:

      val props = stateStore.fetchTopicConfig()
      val config = LogConfig.fromProps(logManager.currentDefaultConfig.originals, props)
      val log = logManager.getOrCreateLog(topicPartition, config, isNew, isFutureReplica)
      

      https://github.com/apache/kafka/blob/33d06082117d971cdcddd4f01392006b543f3c01/core/src/main/scala/kafka/cluster/Partition.scala#L314-L316

      Config changes that arrive after configs are loaded from ZK, but before LogManager added the partition to `futureLogs` or `currentLogs` where the dynamic config handlers picks up topics to update their configs, will be lost.

      Attachments

        Issue Links

          Activity

            People

              vikasconfluent Vikas Singh
              gwenshap Gwen Shapira
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: