[
https://issues.apache.org/jira/browse/KAFKA-4433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15903990#comment-15903990
]
Jun Rao commented on KAFKA-4433:
--------------------------------
[~mgharat], are you sure this is a real issue?
reassignedPartitionLeaderSelector is only used in
moveReassignedPartitionLeaderIfRequired(). At that point, both old and new
replicas are already in sync. So, we switch to one of the new replicas as the
new leader with only the new replicas as the assigned replicas. The old
replicas will be deleted immediately after
moveReassignedPartitionLeaderIfRequired(). So, there is no need for it to
follow the new leader.
> Kafka Controller Does not send a LeaderAndIsr to old leader of a
> topicPartition during reassignment, if the old leader is not a part of the
> new assigned replicas
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-4433
> URL: https://issues.apache.org/jira/browse/KAFKA-4433
> Project: Kafka
> Issue Type: Bug
> Components: controller
> Reporter: Mayuresh Gharat
> Assignee: Mayuresh Gharat
> Priority: Critical
> Labels: reliability
>
> Consider the following scenario :
> old replicas : {[1,2,3], Leader = 1} is reassigned to new replicas :
> {[2,3,4], Leader = 2}
> In this case broker 1 does not receive a LeaderAndIsr request to become a
> follower.
> This happens because of the following :
> val (leaderAndIsr, replicas) = leaderSelector.selectLeader(topicAndPartition,
> currentLeaderAndIsr) in PartitionStateMachine.electLeaderForPartition(...) ,
> the replicas returned by ReassignedPartitionLeaderSelector.selectLeader() is
> only the new Replicas, which are then sent the LeaderAndIsrRequest. So the
> old replica never receives this LeaderAndIsr.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)