FrankYang0529 commented on code in PR #19743:
URL: https://github.com/apache/kafka/pull/19743#discussion_r2100066414
##########
clients/src/main/java/org/apache/kafka/common/requests/ListConfigResourcesRequest.java:
##########
@@ -36,6 +38,15 @@ public Builder(ListConfigResourcesRequestData data) {
@Override
public ListConfigResourcesRequest build(short version) {
+ if (version == 0) {
+ // The v0 only supports CLIENT_METRICS resource type.
+ // Empty resource types means all supported resource types. In
v0, it means CLIENT_METRICS, so it's acceptable.
+ Set<Byte> resourceTypes = new HashSet<>(data.resourceTypes());
+ if ((resourceTypes.size() == 1 &&
!resourceTypes.contains(ConfigResource.Type.CLIENT_METRICS.id())) ||
Review Comment:
Good suggestion. Updated it. 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]