chia7712 commented on code in PR #17128:
URL: https://github.com/apache/kafka/pull/17128#discussion_r1751149794


##########
clients/src/main/java/org/apache/kafka/common/requests/ApiVersionsResponse.java:
##########
@@ -289,19 +289,17 @@ private static SupportedFeatureKeyCollection 
maybeFilterSupportedFeatureKeys(
         SupportedFeatureKeyCollection converted = new 
SupportedFeatureKeyCollection();
         for (Map.Entry<String, SupportedVersionRange> feature : 
latestSupportedFeatures.features().entrySet()) {
             final SupportedVersionRange versionRange = feature.getValue();
-            final SupportedFeatureKey key = new SupportedFeatureKey();
-            key.setName(feature.getKey());
             if (alterV0 && versionRange.min() == 0) {
                 // Some older clients will have deserialization problems if a 
feature's
                 // minimum supported level is 0. Therefore, when preparing 
ApiVersionResponse
-                // at versions less than 4, we must set the minimum version 
for these features
-                // to 1 rather than 0. See KAFKA-17011 for details.
-                key.setMinVersion((short) 1);
+                // at versions less than 4, we must omit these features. See 
KAFKA-17492.

Review Comment:
   @m1a2st Could you please address @junrao comment? That includes following 
files.
   
   
https://github.com/apache/kafka/blob/b22e848ddef975785846af13685ee50ce40d4df9/clients/src/main/resources/common/message/ApiVersionsResponse.json#L50
   
https://github.com/apache/kafka/blob/trunk/clients/src/main/resources/common/message/BrokerRegistrationRequest.json#L51



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