omkreddy commented on a change in pull request #9050: URL: https://github.com/apache/kafka/pull/9050#discussion_r466455643
########## File path: core/src/main/scala/kafka/controller/KafkaController.scala ########## @@ -1986,101 +1965,125 @@ private[controller] class ControllerStats extends KafkaMetricsGroup { sealed trait ControllerEvent { def state: ControllerState + def preempt(): Unit } case object ControllerChange extends ControllerEvent { - override def state = ControllerState.ControllerChange + override def state: ControllerState = ControllerState.ControllerChange + override def preempt(): Unit = {} Review comment: @jeffkbkim I think, we can add default implementation on the trait and add a comment saying that to implement preempt() method for events which have callbacks. I hope, PR reviewers will catch if someone forget to implement preemption methods in future ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org