ocadaruma commented on code in PR #15993:
URL: https://github.com/apache/kafka/pull/15993#discussion_r1618647165


##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -575,9 +575,9 @@ InMemoryLeaderEpochCheckpoint 
getLeaderEpochCheckpoint(UnifiedLog log, long star
         if (log.leaderEpochCache().isDefined()) {
             LeaderEpochFileCache cache = 
log.leaderEpochCache().get().writeTo(checkpoint);
             if (startOffset >= 0) {
-                cache.truncateFromStart(startOffset);
+                cache.truncateFromStart(startOffset, true);

Review Comment:
   > But the way that it achieves the goal is indirect and complicated.
   
   Agree. I +1 for adding a method for directly retrieve necessary epoch 
entries for RLM.



-- 
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

Reply via email to