You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ocadaruma (via GitHub)" <gi...@apache.org> on 2024/06/03 06:29:48 UTC
Re: [PR] KAFKA-16541 Fix potential leader-epoch checkpoint file corruption [kafka]
ocadaruma commented on code in PR #15993:
URL: https://github.com/apache/kafka/pull/15993#discussion_r1623844071
##########
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:
@junrao Thank you for pointing out. I removed InMemoryLeaderEpochCheckpoint (and LeaderEpochCheckpoint interface as well) and refactored the PR based on that.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org