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


##########
clients/src/main/java/org/apache/kafka/common/requests/RequestContext.java:
##########
@@ -191,6 +231,13 @@ public int requestType() {
         return header.apiKey().id;
     }
 
+    /**
+     * Returns the original API version sent by the client in the request 
header. This can differ from

Review Comment:
   The coordinator components receive `AuthorizableRequestContext`, which only 
exposes `requestVersion()` and defines it as the original version from the 
request header.
   
   I think the possible approaches are:
   
   - Add `effectiveApiVersion()` to `AuthorizableRequestContext`, which would 
extend the public authorizer API.
   - Introduce an internal interface exposing the effective version, which 
would require updating the coordinator signatures.
   - Use an `instanceof` check with a fallback to `requestVersion()`, although 
other implementations would still return the original version.
   
   Would you prefer keeping these calls as-is for this PR and addressing the 
coordinator context separately?



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