m1a2st commented on code in PR #23665:
URL: https://github.com/apache/kafka/pull/23665#discussion_r4333098566


##########
clients/src/main/java/org/apache/kafka/common/requests/RequestHeader.java:
##########
@@ -137,11 +137,27 @@ public ResponseHeader toResponseHeader() {
         return new ResponseHeader(data.correlationId(), 
apiKey().responseHeaderVersion(apiVersion()));

Review Comment:
   My understanding is that the original client version and the effective 
version serve different purposes. For an unsupported `ApiVersionsRequest`, the 
original version is N, while the effective version is 0. The current code still 
works because `ApiVersions` always uses response header v0, but deriving both 
formats from the effective version makes the response serialization more 
consistent.
   
   Based on this, I’ve updated both response serialization paths to use the 
effective version. `KafkaApis` now uses the effective version, for handler 
logic, while retaining the original version for the initial API-enabled check.
   
   Please let me know if I missed anything. Thanks!



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