alanlau28 commented on code in PR #23651:
URL: https://github.com/apache/kafka/pull/23651#discussion_r4208272067
##########
clients/src/main/java/org/apache/kafka/common/requests/GetTelemetrySubscriptionsRequest.java:
##########
@@ -40,6 +41,11 @@ public Builder(GetTelemetrySubscriptionsRequestData data,
boolean enableUnstable
@Override
public GetTelemetrySubscriptionsRequest build(short version) {
+ // From v1 the client instance ID is carried by the request header
(KIP-1313) and the body
+ // field only exists in v0, so a non-zero value must not reach the
writer.
+ if (version >= 1 &&
!Uuid.ZERO_UUID.equals(data.clientInstanceId())) {
Review Comment:
Ohh i see what you mean. This method is the first place the version is
checked when the request is being built, so the Id is in the request data at
this point, and cleared in the body for v1 after the check. so we would expect
a non-zero value here.
Although, if there was an exception thrown here, i think this would turn
telemetry off?
--
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]