junrao commented on code in PR #17796:
URL: https://github.com/apache/kafka/pull/17796#discussion_r1847129644


##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -82,6 +82,11 @@ trait PartitionListener {
    * that the partition was deleted but only that this broker does not host a 
replica of it any more.
    */
   def onDeleted(partition: TopicPartition): Unit = {}
+
+  /**
+   * Called when the Partition on this broker is marked as follower.
+   */
+  def onFollower(partition: TopicPartition): Unit = {}

Review Comment:
   If a broker switches from a follower to a follower, there is no need to 
remove the share partition. It's only when a broker is no longer a leader, a 
share partition should be removed. So we could add a more specific 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to