ijuma commented on code in PR #17731:
URL: https://github.com/apache/kafka/pull/17731#discussion_r1896838707
##########
clients/src/main/java/org/apache/kafka/common/requests/RequestContext.java:
##########
@@ -41,7 +41,9 @@ public class RequestContext implements
AuthorizableRequestContext {
public final KafkaPrincipal principal;
public final ListenerName listenerName;
public final SecurityProtocol securityProtocol;
- public final ClientInformation clientInformation;
+ // The client information can be updated if the request is
ApiVersionRequest,
+ // so the client information will not be unknown for ApiVersionRequest.
+ public ClientInformation clientInformation;
Review Comment:
Making this mutable and public seems dangerous. A few things to consider:
1. Thread safety.
2. Whether we want to allow it to be updated only once (if so, we'd want to
have a method that enforces that).
--
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]