You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Neha Narkhede (JIRA)" <ji...@apache.org> on 2013/04/11 00:33:16 UTC

[jira] [Commented] (KAFKA-862) Error incrementing leader high watermark

    [ https://issues.apache.org/jira/browse/KAFKA-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13628374#comment-13628374 ] 

Neha Narkhede commented on KAFKA-862:
-------------------------------------

This is caused by a race condition while updating inSyncReplicaSet. Root cause is Partition.maybeIncrementLeaderHW() does not synchronize on the leaderAndIsrUpdateLock causing it to read an empty in sync replica set. Now, the in sync replica set is empty because the broker is becoming a follower for the same partition at that time. The fix should include two things -

1. synchronize access to inSyncReplicaSet
2. fix the behavior of Partition.maybeIncrementLeaderHW() if the inSyncReplicaSet is empty. This should never happen since at least the leader should be in the set at all times.
                
> Error incrementing leader high watermark
> ----------------------------------------
>
>                 Key: KAFKA-862
>                 URL: https://issues.apache.org/jira/browse/KAFKA-862
>             Project: Kafka
>          Issue Type: Bug
>          Components: replication
>    Affects Versions: 0.8
>            Reporter: Neha Narkhede
>            Assignee: Neha Narkhede
>            Priority: Blocker
>              Labels: kafka-0.8, p1
>
> 2013/04/10 20:04:31.529 ERROR [KafkaApis] [kafka-request-handler-6] [kafka] [] [KafkaApi-270] Error processing ProducerRequest with correlation id 242757885 from client null-13 on foo:3
> java.lang.UnsupportedOperationException: empty.min
>         at scala.collection.TraversableOnce$class.min(TraversableOnce.scala:317)
>         at scala.collection.immutable.Set$EmptySet$.min(Set.scala:47)
>         at kafka.cluster.Partition.maybeIncrementLeaderHW(Partition.scala:263)
>         at kafka.server.KafkaApis$$anonfun$appendToLocalLog$2.apply(KafkaApis.scala:195)
>         at kafka.server.KafkaApis$$anonfun$appendToLocalLog$2.apply(KafkaApis.scala:186)
>         at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
>         at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
>         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 scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
>         at scala.collection.mutable.HashMap.map(HashMap.scala:39)
>         at kafka.server.KafkaApis.appendToLocalLog(KafkaApis.scala:186)
>         at kafka.server.KafkaApis.handleProducerRequest(KafkaApis.scala:120)
>         at kafka.server.KafkaApis.handle(KafkaApis.scala:60)
>         at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:41)
>         at java.lang.Thread.run(Thread.java:619)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira