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

黃竣陽 commented on KAFKA-18477:
-----------------------------

{quote}leader.isTruncationOnFetchSupported is always true in 4.0. 
latestEpoch(tp) should always be available since we only have V2 message format 
in 4.0. So, we only need to transition to the Fetching state and not the 
Truncating state. OffsetsForLeaderEpochRequest is only needed in the Truncating 
state.
{quote}
`leader.isTruncationOnFetchSupported` is not alaways true, There are two 
implement in production code, one is 
RemoteLeaderEndPoint and another is LocalLeaderEndPoint, the properties 
isTruncationOnFetchSupported[1] in LocalLeaderEndPoint is `false`, It seens we 
only can simplified the logic on `latestEpoch(tp)`
[1] 
https://github.com/apache/kafka/blob/e53af1a48974926d2e671b2d02f6bedf0394d3d6/core/src/main/scala/kafka/server/LocalLeaderEndPoint.scala#L58

> 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