splett2 commented on code in PR #13765: URL: https://github.com/apache/kafka/pull/13765#discussion_r1207073563
########## 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: Should we have a test in `PartitionTest` to assert that the HWM is incremented when there is a replica that is fenced but caught up? -- 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