kamalcph commented on code in PR #22661:
URL: https://github.com/apache/kafka/pull/22661#discussion_r3503176294


##########
storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManager.java:
##########
@@ -1440,6 +1454,10 @@ void cleanupExpiredRemoteLogSegments() throws 
RemoteStorageException, ExecutionE
             // Build the leader epoch map by filtering the epochs that do not 
have any records.
             NavigableMap<Integer, Long> epochWithOffsets = 
buildFilteredLeaderEpochMap(leaderEpochCache.epochWithOffsets());
 
+            // Seed highestOffsetInRemoteStorage before size-retention to 
avoid the fresh-leader double-count
+            // (no-op once RLMCopyTask/RLMFollowerTask have seeded it).
+            maybeSeedHighestOffsetInRemoteStorage(log);

Review Comment:
   > The current approach is the approach in this PR, right?
   
   yes, the current solution lgtm.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to