frankvicky commented on code in PR #20083: URL: https://github.com/apache/kafka/pull/20083#discussion_r2194000609
########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -1298,7 +1148,7 @@ class Partition(val topicPartition: TopicPartition, def getOutOfSyncReplicas(maxLagMs: Long): Set[Int] = { val current = partitionState if (!current.isInflight) { - val candidateReplicaIds = current.isr - localBrokerId + val candidateReplicaIds = current.isr.asScala.map(_.toInt).toSet - localBrokerId Review Comment: How about ``` current.isr.stream().filter(isr => isr != localBrokerId).collect(Collectors.toUnmodifiableSet).asScala ``` -- 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