satishd commented on code in PR #13487: URL: https://github.com/apache/kafka/pull/13487#discussion_r1156812334
########## storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java: ########## @@ -359,6 +361,27 @@ public OptionalInt epochForOffset(long offset) { } } + public LeaderEpochFileCache writeTo(LeaderEpochCheckpoint leaderEpochCheckpoint) { + lock.readLock().lock(); + try { + leaderEpochCheckpoint.write(epochEntries()); + return new LeaderEpochFileCache(topicPartition, leaderEpochCheckpoint); + } finally { + lock.readLock().unlock(); + } + } + + public OptionalInt findPreviousEpoch(int epoch) { Review Comment: Good catch! This method is already available as `previousEpoch(int epoch)`. -- 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