Onur Karaman created KAFKA-5028:
-----------------------------------

             Summary: Convert Kafka Controller to a single-threaded event queue 
model
                 Key: KAFKA-5028
                 URL: https://issues.apache.org/jira/browse/KAFKA-5028
             Project: Kafka
          Issue Type: Sub-task
            Reporter: Onur Karaman
            Assignee: Onur Karaman


The goal of this ticket is to improve controller maintainability by simplifying 
the controller's concurrency semantics. The controller code has a lot of shared 
state between several threads using several concurrency primitives. This makes 
the code hard to reason about.

This ticket proposes we convert the controller to a single-threaded event queue 
model. We add a new controller thread which processes events held in an event 
queue. Note that this does not mean we get rid of all threads used by the 
controller. We merely delegate all work that interacts with controller local 
state to this single thread. With only a single thread accessing and modifying 
the controller local state, we no longer need to worry about concurrent access, 
which means we can get rid of the various concurrency primitives used 
throughout the controller.

Performance is expected to match existing behavior since the bulk of the 
existing controller work today already happens sequentially in the ZkClient’s 
single ZkEventThread.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to