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

Long topic names mess up broker topic state

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0.0
    • Fix Version/s: 0.10.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Seems like the broker doesn't like topic names of 254 chars or more when creating using kafka-topics.sh --create.
      The problem does not seem to arise when topic is created through automatic topic creation.

      How to reproduce:

      TOPIC=$(printf 'd%.0s' {1..254} ) ; bin/kafka-topics.sh --zookeeper 0 --create --topic $TOPIC --partitions 1 --replication-factor 1
      
      [2016-02-06 22:00:01,943] INFO [ReplicaFetcherManager on broker 3] Removed fetcher for partitions [dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd,0] (kafka.server.ReplicaFetcherManager)
      [2016-02-06 22:00:01,944] ERROR [KafkaApi-3] Error when handling request {controller_id=3,controller_epoch=12,partition_states=[{topic=dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd,partition=0,controller_epoch=12,leader=3,leader_epoch=0,isr=[3],zk_version=0,replicas=[3]}],live_leaders=[{id=3,host=eden,port=9093}]} (kafka.server.KafkaApis)
      java.lang.NullPointerException
              at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:114)
              at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:114)
              at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:32)
              at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
              at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
              at kafka.log.Log.loadSegments(Log.scala:138)
              at kafka.log.Log.<init>(Log.scala:92)
              at kafka.log.LogManager.createLog(LogManager.scala:357)
              at kafka.cluster.Partition.getOrCreateReplica(Partition.scala:96)
              at kafka.cluster.Partition$$anonfun$4$$anonfun$apply$2.apply(Partition.scala:176)
              at kafka.cluster.Partition$$anonfun$4$$anonfun$apply$2.apply(Partition.scala:176)
              at scala.collection.mutable.HashSet.foreach(HashSet.scala:79)
              at kafka.cluster.Partition$$anonfun$4.apply(Partition.scala:176)
              at kafka.cluster.Partition$$anonfun$4.apply(Partition.scala:170)
              at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:259)
              at kafka.utils.CoreUtils$.inWriteLock(CoreUtils.scala:267)
              at kafka.cluster.Partition.makeLeader(Partition.scala:170)
              at kafka.server.ReplicaManager$$anonfun$makeLeaders$4.apply(ReplicaManager.scala:696)
              at kafka.server.ReplicaManager$$anonfun$makeLeaders$4.apply(ReplicaManager.scala:695)
              at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
              at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
              at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:226)
              at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
              at scala.collection.mutable.HashMap.foreach(HashMap.scala:98)
              at kafka.server.ReplicaManager.makeLeaders(ReplicaManager.scala:695)
              at kafka.server.ReplicaManager.becomeLeaderOrFollower(ReplicaManager.scala:641)
              at kafka.server.KafkaApis.handleLeaderAndIsrRequest(KafkaApis.scala:142)
              at kafka.server.KafkaApis.handle(KafkaApis.scala:79)
              at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:60)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vahid Vahid Hashemian
                Reporter:
                edenhill Magnus Edenhill
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: