jsancio commented on code in PR #13765: URL: https://github.com/apache/kafka/pull/13765#discussion_r1213501789
########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -1087,12 +1087,14 @@ class Partition(val topicPartition: TopicPartition, // avoid unnecessary collection generation val leaderLogEndOffset = leaderLog.logEndOffsetMetadata var newHighWatermark = leaderLogEndOffset - remoteReplicasMap.values.foreach { replica => + remoteReplicasMap.foreachEntry { (replicaId, replica) => Review Comment: Done and Done. I confirmed that the test I added fails for the "fenced" and "shutdown" variant against trunk. -- 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