Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: Handle JoinGroupResponseData.protocolName backward compatibility in JoinGroupResponse #12864

Merged
merged 3 commits into from
Nov 16, 2022

Conversation

dajac
Copy link
Contributor

@dajac dajac commented Nov 16, 2022

This is a small refactor extracted from #12845. It basically moves the logic to handle the backward compatibility of JoinGroupResponseData.protocolName from KafkaApis to JoinGroupResponse.

The patch adds a new unit test for JoinGroupResponse and relies on existing tests as well.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@dajac dajac added the KIP-848 label Nov 16, 2022
Comment on lines +35 to +39
// All versions prior to version 7 do not support nullable
// string for the protocol name. Empty string should be used.
if (version < 7 && data.protocolName() == null) {
data.setProtocolName("");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@jolshan jolshan left a comment

Choose a reason for hiding this comment

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

originally reviewed the change on #12845

lgtm

Copy link
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.

Thanks, LGTM

@hachikuji hachikuji merged commit c2fc36f into apache:trunk Nov 16, 2022
@dajac dajac deleted the minor-refactor-join-group-response branch November 17, 2022 07:16
guozhangwang pushed a commit to guozhangwang/kafka that referenced this pull request Jan 25, 2023
…ty in JoinGroupResponse (apache#12864)

This is a small refactor extracted from apache#12845. It basically moves the logic to handle the backward compatibility of `JoinGroupResponseData.protocolName` from `KafkaApis` to `JoinGroupResponse`.

The patch adds a new unit test for `JoinGroupResponse` and relies on existing tests as well.

Reviewers: Justine Olshan <jolshan@confluent.io>, Jason Gustafson <jason@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants