kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Armando Garcia Sancio (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-8409) Seperate controller thread/manager events from controller events
Date Wed, 22 May 2019 20:00:00 GMT
Jose Armando Garcia Sancio created KAFKA-8409:

             Summary: Seperate controller thread/manager events from controller events
                 Key: KAFKA-8409
                 URL: https://issues.apache.org/jira/browse/KAFKA-8409
             Project: Kafka
          Issue Type: Improvement
          Components: controller
    Affects Versions: 2.4.0
            Reporter: Jose Armando Garcia Sancio
            Assignee: Jose Armando Garcia Sancio

The _ControllerEventManager_ and the _KafkaController_ are driven by processing _ControllerEvent_
in the queue. As of right now the _ControllerEventManager_ is responsible for handling _ShutdownEventThread_
while the _KafkaController_ handles all other events. Since we are using a _sealed trait_
the scala compiler is able to check that all cases are handle in match expressions.

To by pass this compiler feature the _KafkaController_ is matching on _ShutdownEventThread_
and ignoring the result. We should instead  create two type of events. For example:

sealed trait ControllerThreadEvent
final case object ShutdownEventThread extends ControllerThreadEvent
final case class ControllerEvent(event: ControllerEvent) extends ControllerThreadEvent

And remove _ShutdownEventThread_ from the _ControlleveEvent_ _sealed trait_. 

This message was sent by Atlassian JIRA

View raw message