majialoong commented on code in PR #20205:
URL: https://github.com/apache/kafka/pull/20205#discussion_r2225737898


##########
storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManager.java:
##########
@@ -1639,20 +1639,20 @@ static boolean 
isRemoteSegmentWithinLeaderEpochs(RemoteLogSegmentMetadata segmen
      */
     // Visible for testing
     static NavigableMap<Integer, Long> 
buildFilteredLeaderEpochMap(NavigableMap<Integer, Long> leaderEpochs) {
-        List<Integer> epochsWithNoMessages = new ArrayList<>();
+        if (leaderEpochs.size() <= 1) return leaderEpochs;

Review Comment:
   You're right, this isn't necessary.



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