You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Greg Harris (Jira)" <ji...@apache.org> on 2024/07/17 17:30:00 UTC
[jira] [Created] (KAFKA-17157) Refactor mutability and state transitions in DistributedHerder
Greg Harris created KAFKA-17157:
-----------------------------------
Summary: Refactor mutability and state transitions in DistributedHerder
Key: KAFKA-17157
URL: https://issues.apache.org/jira/browse/KAFKA-17157
Project: Kafka
Issue Type: Wish
Reporter: Greg Harris
The DistributedHerder is a very large and interconnected class, and is responsible for:
* Servicing REST requests
* Making REST requests
* Maintaining group membership
* Effecting the rebalance operations (starting, stopping connectors and tasks)
* Effecting session key rotation
* Emitting metrics
This has lead to the DistributedHerder collecting 20+ mutable fields with somewhat non-trivial relationships between one another. The DistributedHerder (at time of writing this description) has 3k+ lines of code, 100+ import statements for 60+ project classes.
It is also one of the most tested classes in Connect, which should enable us to proceed with a refactor with a low probability of regression. We should investigate and determine if there is an opportunity to compartmentalize the state management of the DistributedHerder to make it easier to reason about this class, and test sub-units of the logic in isolation from the DistributedHerder itself.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)