You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2013/11/29 18:29:35 UTC

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

     [ https://issues.apache.org/jira/browse/KAFKA-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao resolved KAFKA-1152.
----------------------------

    Resolution: Fixed

Thanks for the patch. +1 and committed to trunk.

> 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
>
>         Attachments: KAFKA-1152.patch, KAFKA-1152_2013-11-28_10:19:05.patch, KAFKA-1152_2013-11-28_22:40:55.patch
>
>
> 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)