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

Chia-Ping Tsai commented on KAFKA-18477:
----------------------------------------

{quote}
It's unlikely that any topic would only have V0/V1 records since any writes 
with IBP >= 3.0 would result in a V2 record being written. 
{quote}

I understand it's an edge case, but a topic with only v0/v1 records is still 
valid in 4.x, right?

{quote}
latestEpoch(tp) should always be available since we only have V2 message format 
in 4.0
{quote}

Regardless of record version, the leaderEpochCache is updated when appending 
records. Therefore, the follower fetcher doesn't know the latestEpoch when 
starting the fetch thread. However, this looks like a no-op because it 
truncates the offset to 0.

{code:java}
[2025-03-03 09:21:43,792] INFO [ReplicaFetcher replicaId=1, leaderId=0, 
fetcherId=0] Truncating partition 33opic-0 with TruncationState(offset=0, 
completed=true) due to local high watermark 0 
(kafka.server.ReplicaFetcherThread)
[2025-03-03 09:21:43,792] INFO [UnifiedLog partition=33opic-0, 
dir=/tmp/kafka-logs] Truncating to 0 has no effect as the largest offset in the 
log is -1 (kafka.log.UnifiedLog)
{code}


 

> 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