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

alterReplicaLogDirs() should grab partition lock when accessing log of the future replica

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None

    Description

      I found this in a failed execution of
      kafka.admin.ReassignPartitionsClusterTest.shouldExpandCluster. Looks like we're missing some option checking.

      [2018-05-25 08:03:53,310] ERROR [ReplicaManager broker=100] Error while changing replica dir for partition my-topic-2 (kafka.server.ReplicaManager:76)
      java.util.NoSuchElementException: None.get
      	at scala.None$.get(Option.scala:347)
      	at scala.None$.get(Option.scala:345)
      	at kafka.server.ReplicaManager$$anonfun$alterReplicaLogDirs$1.apply(ReplicaManager.scala:584)
      	at kafka.server.ReplicaManager$$anonfun$alterReplicaLogDirs$1.apply(ReplicaManager.scala:576)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
      	at scala.collection.Iterator$class.foreach(Iterator.scala:891)
      	at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
      	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
      	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
      	at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
      	at scala.collection.AbstractTraversable.map(Traversable.scala:104)
      	at kafka.server.ReplicaManager.alterReplicaLogDirs(ReplicaManager.scala:576)
      	at kafka.server.KafkaApis.handleAlterReplicaLogDirsRequest(KafkaApis.scala:2037)
      	at kafka.server.KafkaApis.handle(KafkaApis.scala:138)
      	at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:69)
      	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Activity

          People

            lindong Dong Lin
            hachikuji Jason Gustafson
            Jun Rao Jun Rao
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: