[ https://issues.apache.org/jira/browse/KAFKA-18477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932418#comment-17932418 ]
Jun Rao commented on KAFKA-18477: --------------------------------- {quote}do you mean the truncation logic using the high watermark can be removed? {quote} If the PartitionState never enters the Truncating state, fetchTruncatingPartitions() will always return empty for both partitionsWithEpochs and partitionsWithoutEpochs. Then, we will never need to call truncateToHighWatermark(). {code:java} private def maybeTruncate(): Unit = { val (partitionsWithEpochs, partitionsWithoutEpochs) = fetchTruncatingPartitions() if (partitionsWithEpochs.nonEmpty) { truncateToEpochEndOffsets(partitionsWithEpochs) } if (partitionsWithoutEpochs.nonEmpty) { truncateToHighWatermark(partitionsWithoutEpochs) } } {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)