[
https://issues.apache.org/jira/browse/KAFKA-18477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932499#comment-17932499
]
Chia-Ping Tsai commented on KAFKA-18477:
----------------------------------------
[~junrao] thanks for your patience!.
{quote}
If the PartitionState never enters the Truncating state,
fetchTruncatingPartitions() will always return empty for both
partitionsWithEpochs and partitionsWithoutEpochs
{quote}
I was considering what would happen if we don't truncate the v0/v1 replica
using the high watermark. For instance, if a restarted 4.0 broker has a v0/v1
replica with [LEO=11, HW=10], it must truncate to HW before sending a fetch,
right? I know this case is extremely rare, as the v0/v1 replica in an upgraded
4.0 broker should have HW=LEO.
Also, if we never need to call truncateToHighWatermark(), should we change the
initial offset from HW to LEO?
{code:java}
protected def initialFetchOffset(log: UnifiedLog): Long = {
if (log.latestEpoch.nonEmpty)
log.logEndOffset
else
log.highWatermark
}
{code}
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/ReplicaManager.scala#L2430
> 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)