Skip to content

MINOR: fix compatibility-breaking bug in RequestHeader#7479

Merged
cmccabe merged 3 commits intoapache:trunkfrom
cmccabe:fix-compat-break
Oct 10, 2019
Merged

MINOR: fix compatibility-breaking bug in RequestHeader#7479
cmccabe merged 3 commits intoapache:trunkfrom
cmccabe:fix-compat-break

Conversation

@cmccabe
Copy link
Copy Markdown
Contributor

@cmccabe cmccabe commented Oct 9, 2019

Fix a compatibility break in trunk introduced by the work on KIP-511 and KIP-482.

Older brokers must be able to read the first part of any version of ApiVersionsRequest that they get sent without encountering an error. Therefore, the first part of any new version of the RequestHeader must match the first part in the old header version used alongside the original ApiVersionsRequest.

Fix a compatibility break in trunk introduced by the work on KIP-511 and
KIP-482.

Older brokers must be able to read the first part of any version of
ApiVersionsRequest that they get sent without encountering an error.
Therefore, the first part of any new version of the RequestHeader must
match the first part in the old header version used alongside the
original ApiVersionsRequest.
@cmccabe cmccabe changed the title MINOR: fix compatibility-brekaing bug in RequestHeader MINOR: fix compatibility-breaking bug in RequestHeader Oct 9, 2019
Copy link
Copy Markdown
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think the comment could be improved a little bit, but the change makes sense.

Copy link
Copy Markdown
Member

@mumrah mumrah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Oct 10, 2019

There is another subtle issue:

https://github.com/apache/kafka/pull/7372/files#r333493561

Could we address that in this PR too?

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Oct 10, 2019

RequestHeaderTest.testRequestHeaderV2 is failing.

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Oct 10, 2019

I pushed a fix for the unit test. The null / empty string issue seems more subtle, so let's discuss that in a follow-on.

@cmccabe cmccabe merged commit 5c4bbf9 into apache:trunk Oct 10, 2019
asfgit pushed a commit that referenced this pull request Oct 10, 2019
Reviewers: David Arthur <mumrah@gmail.com>, Jason Gustafson <jason@confluent.io>, Ismael Juma <ismael@juma.me.uk>
(cherry picked from commit 5c4bbf9)
twmb added a commit to twmb/franz-go that referenced this pull request Oct 14, 2019
Noticed a regression, asked about it, was pointed to same fix in Kafka
itself:
apache/kafka#7479
graphcareful pushed a commit to graphcareful/redpanda that referenced this pull request May 27, 2022
- KIP-511 mentions that api_versions_response will not encode tags
within the headers to preserve backwards compatability with clients that
expect the error code at a fixed position within the response.

- Furthermore if the client made an api_versions_request past the max
supported version, then the response is to be sent as a v0 response,
this means we cannot encode the response data with flexible structures.

- Fix to the same thing in kafka itself apache/kafka#7479
graphcareful pushed a commit to graphcareful/redpanda that referenced this pull request May 31, 2022
- KIP-511 mentions that api_versions_response will not encode tags
within the headers to preserve backwards compatability with clients that
expect the error code at a fixed position within the response.

- Furthermore if the client made an api_versions_request past the max
supported version, then the response is to be sent as a v0 response,
this means we cannot encode the response data with flexible structures.

- Fix to the same thing in kafka itself apache/kafka#7479
graphcareful pushed a commit to graphcareful/redpanda that referenced this pull request May 31, 2022
- KIP-511 mentions that api_versions_response will not encode tags
within the headers to preserve backwards compatability with clients that
expect the error code at a fixed position within the response.

- Furthermore if the client made an api_versions_request past the max
supported version, then the response is to be sent as a v0 response,
this means we cannot encode the response data with flexible structures.

- Fix to the same thing in kafka itself apache/kafka#7479
graphcareful pushed a commit to graphcareful/redpanda that referenced this pull request May 31, 2022
- KIP-511 mentions that api_versions_response will not encode tags
within the headers to preserve backwards compatability with clients that
expect the error code at a fixed position within the response.

- Furthermore if the client made an api_versions_request past the max
supported version, then the response is to be sent as a v0 response,
this means we cannot encode the response data with flexible structures.

- Fix to the same thing in kafka itself apache/kafka#7479
graphcareful pushed a commit to graphcareful/redpanda that referenced this pull request Jun 1, 2022
- KIP-511 mentions that api_versions_response will not encode tags
within the headers to preserve backwards compatability with clients that
expect the error code at a fixed position within the response.

- Furthermore if the client made an api_versions_request past the max
supported version, then the response is to be sent as a v0 response,
this means we cannot encode the response data with flexible structures.

- Fix to the same thing in kafka itself apache/kafka#7479
graphcareful pushed a commit to graphcareful/redpanda that referenced this pull request Jun 1, 2022
- KIP-511 mentions that api_versions_response will not encode tags
within the headers to preserve backwards compatability with clients that
expect the error code at a fixed position within the response.

- Furthermore if the client made an api_versions_request past the max
supported version, then the response is to be sent as a v0 response,
this means we cannot encode the response data with flexible structures.

- Fix to the same thing in kafka itself apache/kafka#7479
graphcareful pushed a commit to graphcareful/redpanda that referenced this pull request Jun 2, 2022
- KIP-511 mentions that api_versions_response will not encode tags
within the headers to preserve backwards compatability with clients that
expect the error code at a fixed position within the response.

- Furthermore if the client made an api_versions_request past the max
supported version, then the response is to be sent as a v0 response,
this means we cannot encode the response data with flexible structures.

- Fix to the same thing in kafka itself apache/kafka#7479
graphcareful pushed a commit to graphcareful/redpanda that referenced this pull request Jun 3, 2022
- KIP-511 mentions that api_versions_response will not encode tags
within the headers to preserve backwards compatability with clients that
expect the error code at a fixed position within the response.

- Furthermore if the client made an api_versions_request past the max
supported version, then the response is to be sent as a v0 response,
this means we cannot encode the response data with flexible structures.

- Fix to the same thing in kafka itself apache/kafka#7479
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants