Description
Saw the following exception in kafka.server.LeaderElectionTest. It seems that the lock may not be acquired before unlocking.
java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)
at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
at kafka.server.ReplicaManager.makeFollower(ReplicaManager.scala:233)
at kafka.server.KafkaServer.makeFollower(KafkaServer.scala:164)
at kafka.server.KafkaServer$$anonfun$startup$7.apply(KafkaServer.scala:101)
at kafka.server.KafkaServer$$anonfun$startup$7.apply(KafkaServer.scala:101)
at kafka.server.KafkaApis$$anonfun$handleLeaderAndISRRequest$2.apply(KafkaApis.scala:99)
at kafka.server.KafkaApis$$anonfun$handleLeaderAndISRRequest$2.apply(KafkaApis.scala:74)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80)
at scala.collection.Iterator$class.foreach(Iterator.scala:631)
at scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:161)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:194)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:80)
at kafka.server.KafkaApis.handleLeaderAndISRRequest(KafkaApis.scala:74)
at kafka.server.KafkaApis.handle(KafkaApis.scala:62)
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:38)
at java.lang.Thread.run(Thread.java:637)