cmccabe commented on code in PR #19416:
URL: https://github.com/apache/kafka/pull/19416#discussion_r2053109111


##########
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),
+                        validateOnly
+                    );
+                    /* Add the noop record so that there is at least one 
offset to wait on to
+                     * complete the upgrade RPC
+                     */
+                    records.add(new ApiMessageAndVersion(new NoOpRecord(), 
(short) 0));

Review Comment:
   ok, in that case it looks good.



-- 
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

Reply via email to