Jeff Kim created KAFKA-10193:
--------------------------------

             Summary: Add preemption for ControllerEvent that have callbacks
                 Key: KAFKA-10193
                 URL: https://issues.apache.org/jira/browse/KAFKA-10193
             Project: Kafka
          Issue Type: Bug
          Components: controller, metrics
            Reporter: Jeff Kim
            Assignee: Jeff Kim


There are classes that extends `ControllerEvent` and have callbacks but do not 
provide preemption:
 1. 
[ApiPartitionReassignment|https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/controller/KafkaController.scala#L2073-L2074]

2. 
[ListPartitionReassignments|https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/controller/KafkaController.scala#L2098-L2099]

Currently, the KafkaApi requests timeout for these events when the state of the 
controller changes. Instead we should preempt these events so that the requests 
are responded with a `NOT_CONTROLLER` error as we do for `ControlledShutdown` 
and `ReplicaLeaderElection` events. We can provide preemption 
[here|https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/controller/KafkaController.scala#L1862-L1870].
  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to