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

[jira] [Created] (KAFKA-1152) ReplicaManager's handling of the leaderAndIsrRequest should gracefully handle leader == -1

Swapnil Ghike created KAFKA-1152:
------------------------------------

             Summary: ReplicaManager's handling of the leaderAndIsrRequest should gracefully handle leader == -1
                 Key: KAFKA-1152
                 URL: https://issues.apache.org/jira/browse/KAFKA-1152
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 0.8
            Reporter: Swapnil Ghike
            Assignee: Swapnil Ghike
             Fix For: 0.8.1


If a partition is created with replication factor 1, then the controller can set the partition's leader to -1 in leaderAndIsrRequest when the only replica of the partition is being bounced. 

The handling of this request with a leader == -1 throws an exception on the ReplicaManager which prevents the addition of fetchers for the remaining partitions in the leaderAndIsrRequest.

After the replica is bounced, the replica first receives a leaderAndIsrRequest with leader == -1, then it receives another leaderAndIsrRequest with the correct leader (which is the replica itself) due to OfflinePartition to OnlinePartition state change. 

In handling the first request, ReplicaManager should ignore the partition for which the request has leader == -1, and continue addition of fetchers for the remaining partitions. The next leaderAndIsrRequest will take care of setting the correct leader for that partition.



--
This message was sent by Atlassian JIRA
(v6.1#6144)