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


##########
metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java:
##########
@@ -188,12 +182,16 @@ private ApiError updateFeature(
             }
         }
 
-        if (currentVersion != null && newVersion < currentVersion) {
+        if (newVersion < currentVersion) {
             if (upgradeType.equals(FeatureUpdate.UpgradeType.UPGRADE)) {

Review Comment:
   We do check it in `updateFeature`, right?
   
   ```
           if (upgradeType.equals(FeatureUpdate.UpgradeType.UNKNOWN)) {        
               return invalidUpdateVersion(featureName, newVersion,            
                   "The controller does not support the given upgrade type."); 
           }                                                                   
   ```
   
   I do kind of wish we did less in `QuorumController#updateFeatures` and more 
in the `FeatureControlManager` (because it's easier to unit test the latter) 
but this particular case is covered, I think.



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

Reply via email to