cmccabe commented on code in PR #12050:
URL: https://github.com/apache/kafka/pull/12050#discussion_r871910034
##########
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:
Rather than having a listener like this, why not just throw an exception
from `replay()` if we can't handle the new feature level?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]