[ 
https://issues.apache.org/jira/browse/KAFKA-9643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17050616#comment-17050616
 ] 

Dominic Evans commented on KAFKA-9643:
--------------------------------------

{code:java}
diff --git a/testdata/IncrementalAlterConfigsRequest.json 
b/testdata/IncrementalAlterConfigsRequest.json
index b1fb1e9..832655b 100644
--- a/testdata/IncrementalAlterConfigsRequest.json
+++ b/testdata/IncrementalAlterConfigsRequest.json
@@ -21,13 +21,13 @@
   "validVersions": "0-1",
   "flexibleVersions": "1+",
   "fields": [
-    { "name": "Resources", "type": "[]AlterConfigsResource", "versions": "0+",
+    { "name": "Resources", "type": "[]IncrementalAlterConfigsResource", 
"versions": "0+",
       "about": "The incremental updates for each resource.", "fields": [
       { "name": "ResourceType", "type": "int8", "versions": "0+", "mapKey": 
true,
         "about": "The resource type." },
       { "name": "ResourceName", "type": "string", "versions": "0+", "mapKey": 
true,
         "about": "The resource name." },
-      { "name": "Configs", "type": "[]AlterableConfig", "versions": "0+",
+      { "name": "Configs", "type": "[]IncrementalAlterableConfig", "versions": 
"0+",
         "about": "The configurations.",  "fields": [
         { "name": "Name", "type": "string", "versions": "0+", "mapKey": true,
           "about": "The configuration key name." },
diff --git a/testdata/IncrementalAlterConfigsResponse.json 
b/testdata/IncrementalAlterConfigsResponse.json
index d4dad29..88f665a 100644
--- a/testdata/IncrementalAlterConfigsResponse.json
+++ b/testdata/IncrementalAlterConfigsResponse.json
@@ -23,7 +23,7 @@
   "fields": [
     { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
       "about": "Duration in milliseconds for which the request was throttled 
due to a quota violation, or zero if the request did not violate any quota." },
-    { "name": "Responses", "type": "[]AlterConfigsResourceResponse", 
"versions": "0+",
+    { "name": "Responses", "type": 
"[]IncrementalAlterConfigsResourceResponse", "versions": "0+",
       "about": "The responses for each resource.", "fields": [
       { "name": "ErrorCode", "type": "int16", "versions": "0+",
         "about": "The resource error code." },

{code}

> AlterConfigsRequest and IncrementalAlterConfigsRequest use conflicting type 
> names
> ---------------------------------------------------------------------------------
>
>                 Key: KAFKA-9643
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9643
>             Project: Kafka
>          Issue Type: Bug
>          Components: protocol
>    Affects Versions: 2.4.0
>            Reporter: Dominic Evans
>            Priority: Minor
>              Labels: generator, protocol
>
> In general the message format definitions used by the generator have 
> maintained unique types between them.
> However, the AlterConfigsRequest and IncrementalAlterConfigsRequest 
> definitions both refer to the AlterConfigsResource and AlterableConfig type, 
> with the latter containing different fields in the Incremental case
> [https://github.com/apache/kafka/blob/69b670a444c7638f663e13dc37e0532ce64b1363/clients/src/main/resources/common/message/AlterConfigsRequest.json#L23-L36]
> [https://github.com/apache/kafka/blob/69b670a444c7638f663e13dc37e0532ce64b1363/clients/src/main/resources/common/message/IncrementalAlterConfigsRequest.json#L23-L38]
> In the response case, the whole format is currently identical (although that 
> may change in the future) and both refer to an "AlterConfigsResponse" type 
> with identical fields
> [https://github.com/apache/kafka/blob/69b670a444c7638f663e13dc37e0532ce64b1363/clients/src/main/resources/common/message/AlterConfigsResponse.json#L23-L38]
> [https://github.com/apache/kafka/blob/69b670a444c7638f663e13dc37e0532ce64b1363/clients/src/main/resources/common/message/IncrementalAlterConfigsResponse.json#L23-L38|https://github.com/apache/kafka/blob/69b670a444c7638f663e13dc37e0532ce64b1363/clients/src/main/resources/common/message/IncrementalAlterConfigsResponse.json#L23-L3]
> I'm not sure what any potential backward compatibility ramifications would 
> be, but it seems like it would be a good idea to avoid this collision by 
> (e.g.,) prefixing the Incremental types with "Incremental" going forward.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to