joshua2519 commented on code in PR #20083: URL: https://github.com/apache/kafka/pull/20083#discussion_r2193967805
########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -1949,9 +1799,9 @@ class Partition(val topicPartition: TopicPartition, // 2) leaderAndIsr.partitionEpoch == partitionEpoch: No update was performed since proposed and actual state are the same. // In both cases, we want to move from Pending to Committed state to ensure new updates are processed. - partitionState = CommittedPartitionState(leaderAndIsr.isr.asScala.map(_.toInt).toSet, leaderAndIsr.leaderRecoveryState) + partitionState = new CommittedPartitionState(util.Set.copyOf(leaderAndIsr.isr), leaderAndIsr.leaderRecoveryState) Review Comment: > Could you change `leaderAndIsr.isr` to return immutable set? Thanks for that. I changed it to immutable set and patched related test. -- 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