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


##########
clients/src/main/java/org/apache/kafka/clients/admin/FeatureUpdate.java:
##########
@@ -23,33 +23,92 @@
  */
 public class FeatureUpdate {
     private final short maxVersionLevel;
-    private final boolean allowDowngrade;
+    private final DowngradeType downgradeType;
+
+    public enum DowngradeType {
+        NONE(0),
+        SAFE(1),
+        UNSAFE(2);
+

Review Comment:
   There needs to be an UNKNOWN value which unknown values get translated to. 
This is necessary on the server since we want to be able to deserialize things 
without throwing an exception.
   
   I'd suggest making the UNKNOWN enum equal to 0 and going from there...



##########
clients/src/main/java/org/apache/kafka/clients/admin/FeatureUpdate.java:
##########
@@ -23,33 +23,92 @@
  */
 public class FeatureUpdate {
     private final short maxVersionLevel;
-    private final boolean allowDowngrade;
+    private final DowngradeType downgradeType;
+
+    public enum DowngradeType {
+        NONE(0),
+        SAFE(1),
+        UNSAFE(2);
+

Review Comment:
   There needs to be an UNKNOWN value which unknown values get translated to. 
This is necessary on the server since we want to be able to deserialize things 
from newer clients without throwing an exception.
   
   I'd suggest making the UNKNOWN enum equal to 0 and going from there...



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