[ 
https://issues.apache.org/jira/browse/KAFKA-4962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dong Lin updated KAFKA-4962:
----------------------------
    Description: 
The schemas implementation in Protocol.java is currently inconsistent. For 
example, the implementation of `FETCH_REQUEST_V3` referenced 
`FETCH_REQUEST_TOPIC_V0`. But the implementation of 
`FETCH_RESPONSE_PARTITION_HEADER_V5` referenced 
`FETCH_RESPONSE_ABORTED_TRANSACTION_V5` which has the same value of 
`FETCH_RESPONSE_ABORTED_TRANSACTION_V4`.

To make the code consistent, we should either create and reference a sub-schema 
with the same version for every schema implementation, or avoid creating new 
sub-schema if that schema has the same value as an existing schema, but not 
using a mixture of both patterns in the code.

  was:
The schemas implementation in Protocol.java is currently inconsistent. For 
example, the implementation of `FETCH_REQUEST_V3` referenced 
`FETCH_REQUEST_TOPIC_V0`. But the implementation of 
`FETCH_RESPONSE_PARTITION_HEADER_V5` referenced 
`FETCH_RESPONSE_ABORTED_TRANSACTION_V5` which has the same value of 
`FETCH_RESPONSE_ABORTED_TRANSACTION_V4`.

To make the code consistent, we should either create and reference a sub-schema 
with the same version for every schema implementation, or avoid creating new 
sub-schema if that schema has the same value as an existing schema.


> Unify the implentation of schemas in Protocol.java
> --------------------------------------------------
>
>                 Key: KAFKA-4962
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4962
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Dong Lin
>
> The schemas implementation in Protocol.java is currently inconsistent. For 
> example, the implementation of `FETCH_REQUEST_V3` referenced 
> `FETCH_REQUEST_TOPIC_V0`. But the implementation of 
> `FETCH_RESPONSE_PARTITION_HEADER_V5` referenced 
> `FETCH_RESPONSE_ABORTED_TRANSACTION_V5` which has the same value of 
> `FETCH_RESPONSE_ABORTED_TRANSACTION_V4`.
> To make the code consistent, we should either create and reference a 
> sub-schema with the same version for every schema implementation, or avoid 
> creating new sub-schema if that schema has the same value as an existing 
> schema, but not using a mixture of both patterns in the code.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to