[ https://issues.apache.org/jira/browse/KAFKA-15510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chern Yih Cheah updated KAFKA-15510: ------------------------------------ Affects Version/s: 3.5.1 3.6.0 > Follower's lastFetchedEpoch wrongly set when fetch response has no record > ------------------------------------------------------------------------- > > Key: KAFKA-15510 > URL: https://issues.apache.org/jira/browse/KAFKA-15510 > Project: Kafka > Issue Type: Bug > Affects Versions: 3.6.0, 3.5.1 > Reporter: Chern Yih Cheah > Assignee: Chern Yih Cheah > Priority: Major > > A regression is introduced by > [https://github.com/apache/kafka/pull/13843/files#diff-508e9dc4d52744119dda36d69ce63a1901abfd3080ca72fc4554250b7e9f5242.|https://github.com/apache/kafka/pull/13843/files#diff-508e9dc4d52744119dda36d69ce63a1901abfd3080ca72fc4554250b7e9f5242] > When the fetch response has no record for a partition, validBytes is 0. In > this case, we shouldn't set the last fetch epoch to > logAppendInfo.lastLeaderEpoch.asScala since there is no record and it is > Optional.empty. We should use currentFetchState.lastFetchedEpoch instead. > An effect of this is truncation of fetch might not work correctly. > -- This message was sent by Atlassian Jira (v8.20.10#820010)