chernyih commented on code in PR #14457: URL: https://github.com/apache/kafka/pull/14457#discussion_r1338903942
########## core/src/main/scala/kafka/server/AbstractFetcherThread.scala: ########## @@ -364,10 +364,11 @@ abstract class AbstractFetcherThread(name: String, // ReplicaDirAlterThread may have removed topicPartition from the partitionStates after processing the partition data if ((validBytes > 0 || currentFetchState.lag.isEmpty) && partitionStates.contains(topicPartition)) { + val lastFetchedEpoch = + if (validBytes > 0) logAppendInfo.lastLeaderEpoch.asScala else currentFetchState.lastFetchedEpoch Review Comment: Make sense. Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org