cmccabe commented on code in PR #19416: URL: https://github.com/apache/kafka/pull/19416#discussion_r2051552703
########## metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java: ########## @@ -225,6 +272,32 @@ private ApiError updateFeature( if (featureName.equals(MetadataVersion.FEATURE_NAME)) { // Perform additional checks if we're updating metadata.version return updateMetadataVersion(newVersion, upgradeType.equals(FeatureUpdate.UpgradeType.UNSAFE_DOWNGRADE), records::add); + } else if (featureName.equals(KRaftVersion.FEATURE_NAME)) { + if (upgradeType.equals(FeatureUpdate.UpgradeType.UPGRADE)) { + try { + kraftVersionAccessor.upgradeKRaftVersion( + currentClaimedEpoch, + KRaftVersion.fromFeatureLevel(newVersion), Review Comment: you need to handle the `RuntimeException` that will be thrown if `newVersion` cannot be turned into a `KRaftVersion` object. Otherwise you will cause a controller failover here potentially. -- 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