chia7712 commented on code in PR #24340: URL: https://github.com/apache/kafka/pull/24340#discussion_r4683971021
########## clients/src/main/resources/common/message/CreateAclsRequest.json: ########## @@ -22,7 +22,8 @@ // Version 1 adds resource pattern type. // Version 2 enables flexible versions. // Version 3 adds user resource type. - "validVersions": "1-3", + // Version 4 adds the cluster mirror resource type (KIP-1279). + "validVersions": "1-4", Review Comment: > Could we add a client-side check for the three requests, rejecting CLUSTER_MIRROR when version < 4? +1 and this should be addressed in this PR > Without this check, a new client talking to an old broker gets confusing results. Sending an unknown resource type code results in INVALID_REQUEST for create, while describe silently returns an empty list, which can be mistaken for "no ACLs". (I think this is another issue) We can't return code 0 to clients because `DescribeAclsResponse` and `DeleteAclsResponse` can't take it. The `UNKNOWN` type has not been handled correctly for a long time. We probably need to fix the following issues. 1. the describe/delete ACLs should filter out the `UNKNOWN` type to avoid `IllegalArgumentException` 2. return `INVALID_REQUEST` if the (DescribeAcls) request carries `UNKNOWN` type I will create tickets for them later -- 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]
