mumrah commented on code in PR #12050: URL: https://github.com/apache/kafka/pull/12050#discussion_r872493845
########## metadata/src/main/java/org/apache/kafka/controller/QuorumController.java: ########## @@ -927,6 +984,29 @@ private void appendRaftEvent(String name, Runnable runnable) { } } + /** + * A callback for changes to feature levels including metadata.version. This is called synchronously from + * {@link FeatureControlManager#replay(FeatureLevelRecord)} which is part of a ControllerWriteEvent. It is safe + * to modify controller state here. By the time this listener is called, a FeatureLevelRecord has been committed and + * the in-memory state of FeatureControlManager has been updated. + */ + class QuorumFeatureListener implements FeatureLevelListener { + @Override + public void handle(String featureName, short finalizedVersion) { Review Comment: If we need to react to a feature level change in one of the control managers, it will probably be easier to do it via QuorumController rather than adding dependencies to FeatureControlManager. But, we don't have any use cases yet so I guess we don't really need the listener thing yet. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org