jolshan commented on code in PR #16421:
URL: https://github.com/apache/kafka/pull/16421#discussion_r1669262604


##########
clients/src/main/java/org/apache/kafka/common/requests/BrokerRegistrationRequest.java:
##########
@@ -45,7 +46,21 @@ public short oldestAllowedVersion() {
 
         @Override
         public BrokerRegistrationRequest build(short version) {
-            return new BrokerRegistrationRequest(data, version);
+            if (version < 4) {
+                // Workaround for KAFKA-17011: for BrokerRegistrationRequest 
versions older than 4,
+                // exclude support version ranges that begin with 0.

Review Comment:
   I think we still need to finalize/agree here about omission vs. using 1 for 
older versions of the api. 
   
   Right now we have omit for broker registration, but using version 1 for 
ApiVersions. We also have the option to use 1 for both or omit for both. Note: 
In 3.8, we omit for both requests.
   
   I think there is some benefit in not including a version with 0 to older 
controllers rather than 1, but can also understand that it is confusing to have 
different approaches for different APIs. 
   
   @junrao I know you had some opinions here.



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