cmccabe commented on pull request #10095: URL: https://github.com/apache/kafka/pull/10095#issuecomment-776924564
Thanks for the reviews, @mumrah ! > One thing I don't love is how BrokerLifecycleManager can be instantiated but some of the members are not initialized until start is called. Is there no way we can defer initialization until all the dependencies of this class are available? I think the next PR in the series makes things clearer. The `BrokerServer` uses `BrokerLifecycleManager` to manage the broker state at all times, not just after the broker has been started or before it has been stopped. Although there is a little bit of extra complexity in the lifecycle manager to support this usage, it makes the surrounding code much simpler because we can rely on this component to always have the state. Therefore we don't need more mutable state and if statements in `BrokerServer`. ---------------------------------------------------------------- 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: us...@infra.apache.org