You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/08 23:46:51 UTC

[GitHub] [kafka] cmccabe commented on a change in pull request #10997: MINOR: Fix flaky deleteSnapshots test

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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org