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

Neha Narkhede commented on KAFKA-763:
-------------------------------------

Not sure if I understood that. But what needs to happen is the new follower 
should fetch the earliest and latest message from the new leader. If its latest 
offset < leader's latest offset after truncating from the last checkpointed 
highwatermark, it can just start fetching from the leader. If its latest offset 
> leader's latest offset, then it should truncate to leader's latest offset and 
begin fetching from there. But there is a problem if the leader's latest offset 
is already garbage collected from the follower since that will truncate all of 
the followers data. So we might also have to check follower's earliest offset 
== leader's earliest offset. 

But basically, it seems very tricky to do this correctly and I'm wondering what 
is the data backing up that this fix is required ? Is there one particular case 
that we are trying to solve ?
                
> Add an option to replica from the largest offset during unclean leader 
> election
> -------------------------------------------------------------------------------
>
>                 Key: KAFKA-763
>                 URL: https://issues.apache.org/jira/browse/KAFKA-763
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>            Priority: Blocker
>              Labels: p2
>         Attachments: kafka-763_v1.patch
>
>
> If there is an unclean leader election, a follower may have an offset out of 
> the range of the leader. Currently, the follower will delete all its data and 
> refetch from the smallest offset of the leader. It would be useful to add an 
> option to let the follower refetch from the largest offset of the leader 
> since refetching from the smallest offset may take some time.

--
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

Reply via email to