[ https://issues.apache.org/jira/browse/KAFKA-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Swapnil Ghike updated KAFKA-1152: --------------------------------- Attachment: KAFKA-1152_2013-11-28_22:40:55.patch > 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)