dajac commented on code in PR #13196: URL: https://github.com/apache/kafka/pull/13196#discussion_r1108752686
########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -318,6 +358,25 @@ class Partition(val topicPartition: TopicPartition, def inSyncReplicaIds: Set[Int] = partitionState.isr + def maybeAddListener(listener: PartitionListener): Boolean = { + inReadLock(leaderIsrUpdateLock) { + // `log` is set to `None` when the partition is failed or deleted. + log match { + case Some(log) => + listener.onHighWatermarkUpdated(topicPartition, log.highWatermark) + listeners.add(listener) Review Comment: I think that you are right. As a second thought, I don't need this call during the registration for the new group coordinator because it registers before doing any writes. I will remove it. @jolshan The idea was to provide an initial value to the listener. -- 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