jsancio commented on code in PR #13845: URL: https://github.com/apache/kafka/pull/13845#discussion_r1235409277
########## raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java: ########## @@ -1017,7 +1017,16 @@ private FetchResponseData tryCompleteFetchRequest( long fetchOffset = request.fetchOffset(); int lastFetchedEpoch = request.lastFetchedEpoch(); LeaderState<T> state = quorum.leaderStateOrThrow(); - ValidOffsetAndEpoch validOffsetAndEpoch = log.validateOffsetAndEpoch(fetchOffset, lastFetchedEpoch); + + Optional<OffsetAndEpoch> latestSnapshotId = log.latestSnapshotId(); + final ValidOffsetAndEpoch validOffsetAndEpoch; + if (fetchOffset == 0 && latestSnapshotId.isPresent()) { Review Comment: Thanks @dengziming We had a similar conversation in another PR: https://github.com/apache/kafka/pull/13834#discussion_r1224779841 In short, it is not clear to me that these improvements (implementation complexities) are a big win for the cluster metadata partition. -- 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