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

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

[~m1a2st] : Sorry for the late reply. We can change 
LocalLeaderEndPoint.isTruncationOnFetchSupported() to true since in 4.0, every 
replica supports lastFetchedEpoch in the fetch request. So, we could handle 
truncation in both LocalLeaderEndPoint and RemoteLeaderEndPoint in the same way 
based on the DivergingEpoch field in FetchResponse. A couple of more details.

1. Currently, in LocalLeaderEndPoint, we don't call 
partitionData.setDivergingEpoch() in processResponseCallback(). So we need to 
add that.

2. When an empty replica is added, it doesn't have an initial latest epoch. In 
that case we can transition to the Fetching state with -1 as the latest epoch. 
The server will just bypass the latest epoch validation. This is ok since the 
replica has no existing data.

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