CalvinConfluent commented on code in PR #14594: URL: https://github.com/apache/kafka/pull/14594#discussion_r1373427855
########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -1106,6 +1115,12 @@ class Partition(val topicPartition: TopicPartition, * @return true if the HW was incremented, and false otherwise. */ private def maybeIncrementLeaderHW(leaderLog: UnifiedLog, currentTimeMs: Long = time.milliseconds): Boolean = { + if (metadataCache.isInstanceOf[KRaftMetadataCache] && interBrokerProtocolVersion.isElrSupported && eligibleLeaderReplicasEnabled) { Review Comment: I guess ZK can also upgrade to 3.7IV1 and the elrEnabled is a static config shared between Kraft and ZK? ########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -1106,6 +1115,12 @@ class Partition(val topicPartition: TopicPartition, * @return true if the HW was incremented, and false otherwise. */ private def maybeIncrementLeaderHW(leaderLog: UnifiedLog, currentTimeMs: Long = time.milliseconds): Boolean = { + if (metadataCache.isInstanceOf[KRaftMetadataCache] && interBrokerProtocolVersion.isElrSupported && eligibleLeaderReplicasEnabled) { + if (isUnderMinIsr) { + debug(s"Skip checking whether HWM can advance because partition=$topicPartition is under min ISR(ISR=${partitionState.isr}") Review Comment: Thanks! Done. -- 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