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

Jun Rao commented on KAFKA-18477:
---------------------------------

[~chia7712] : To send an OffsetForLeaderRequest, we need the leader epoch. If 
there is no leader epoch, we could just fall back to sending a FetchRequest 
with -1 as LastFetchedEpoch to achieve the same behavior.

 

When a new replica is first created, it creates an empty log with offset 0. If 
the leader still contains offset 0, the replica will catch up through the 
fetched data. If the leader no longer contains offset 0, it will reply with an 
OffsetOutOfRangeException. The replica will then truncate to the earliest 
offset in the leader by issuing a ListOffset request. 

 

So, all the processes in the follower can be done without issuing an 
OffsetForLeaderRequest.

> remove usage of OffsetForLeaderEpochRequest in AbstractFetcherThread
> --------------------------------------------------------------------
>
>                 Key: KAFKA-18477
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18477
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 4.0.0
>            Reporter: Jun Rao
>            Assignee: 黃竣陽
>            Priority: Major
>             Fix For: 4.1.0
>
>
> This is because of the base MV in 4.0 is 3.0.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to