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

ZK migration fails on configs for default broker resource

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.5.1
    • 3.6.0, 3.5.2
    • None
    • None

    Description

      This error was seen while performing a ZK to KRaft migration on a cluster with configs for the default broker resource

       

      java.lang.NumberFormatException: For input string: ""
      	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
      	at java.base/java.lang.Integer.parseInt(Integer.java:678)
      	at java.base/java.lang.Integer.valueOf(Integer.java:999)
      	at kafka.zk.ZkMigrationClient.$anonfun$migrateBrokerConfigs$2(ZkMigrationClient.scala:371)
      	at kafka.zk.migration.ZkConfigMigrationClient.$anonfun$iterateBrokerConfigs$1(ZkConfigMigrationClient.scala:174)
      	at kafka.zk.migration.ZkConfigMigrationClient.$anonfun$iterateBrokerConfigs$1$adapted(ZkConfigMigrationClient.scala:156)
      	at scala.collection.immutable.BitmapIndexedMapNode.foreach(HashMap.scala:1076)
      	at scala.collection.immutable.HashMap.foreach(HashMap.scala:1083)
      	at kafka.zk.migration.ZkConfigMigrationClient.iterateBrokerConfigs(ZkConfigMigrationClient.scala:156)
      	at kafka.zk.ZkMigrationClient.migrateBrokerConfigs(ZkMigrationClient.scala:370)
      	at kafka.zk.ZkMigrationClient.cleanAndMigrateAllMetadata(ZkMigrationClient.scala:530)
      	at org.apache.kafka.metadata.migration.KRaftMigrationDriver$MigrateMetadataEvent.run(KRaftMigrationDriver.java:618)
      	at org.apache.kafka.queue.KafkaEventQueue$EventContext.run(KafkaEventQueue.java:127)
      	at org.apache.kafka.queue.KafkaEventQueue$EventHandler.handleEvents(KafkaEventQueue.java:210)
      	at org.apache.kafka.queue.KafkaEventQueue$EventHandler.run(KafkaEventQueue.java:181)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      	at org.apache.kafka.common.utils.KafkaThread.run(KafkaThread.java:64) 

       

      This is due to not considering the default resource type when we collect the broker IDs in ZkMigrationClient#migrateBrokerConfigs.

       

       

      Attachments

        Issue Links

          Activity

            People

              davidarthur David Arthur
              davidarthur David Arthur
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: