cmccabe commented on a change in pull request #10997:
URL: https://github.com/apache/kafka/pull/10997#discussion_r666583174



##########
File path: core/src/main/scala/kafka/raft/KafkaMetadataLog.scala
##########
@@ -404,13 +404,13 @@ final class KafkaMetadataLog private (
       return false
 
     var didClean = false
-    snapshots.keys.toSeq.sliding(2).toSeq.takeWhile {
+    snapshots.keys.toSeq.sliding(2).foreach {
       case Seq(snapshot: OffsetAndEpoch, nextSnapshot: OffsetAndEpoch) =>
         if (predicate(snapshot) && deleteBeforeSnapshot(nextSnapshot)) {
           didClean = true
           true

Review comment:
       This "true" is not needed now, right?




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