You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/08/06 14:31:22 UTC
[GitHub] [kafka] omkreddy commented on a change in pull request #9050: KAFKA-10193: Add preemption for controller events that have callbacks
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:
users@infra.apache.org