divijvaidya commented on code in PR #13561: URL: https://github.com/apache/kafka/pull/13561#discussion_r1293224397
########## core/src/main/java/kafka/log/remote/RemoteLogManager.java: ########## @@ -581,11 +588,18 @@ public void run() { if (isLeader()) { // Copy log segments to remote storage copyLogSegmentsToRemote(); + // Cleanup/delete expired remote log segments + cleanupExpiredRemoteLogSegments(); + } else { + Optional<UnifiedLog> unifiedLogOptional = fetchLog.apply(topicIdPartition.topicPartition()); + if (unifiedLogOptional.isPresent()) { + long offset = findHighestRemoteOffset(topicIdPartition); + unifiedLogOptional.get().updateHighestOffsetInRemoteStorage(offset); Review Comment: @satishd can you please address this comment. Multiple folks have asked me why this code of line exists which makes me believe that a comment explaining the purpose here would be nice. -- 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