Skip to content

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

Merged
hachikuji merged 3 commits into
apache:trunkfrom
dajac:minor-refactor-join-group-response
Nov 16, 2022
Merged

hachikuji merged 3 commits into
apache:trunkfrom
dajac:minor-refactor-join-group-response

Conversation

@dajac

@dajac dajac commented Nov 16, 2022

Copy link
Copy Markdown
Member

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 The Next Generation of the Consumer Rebalance Protocol 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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@jolshan jolshan left a comment

Copy link
Copy Markdown
Member

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

@hachikuji hachikuji left a comment

Copy link
Copy Markdown
Contributor

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 <[email protected]>, Jason Gustafson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

KIP-848 The Next Generation of the Consumer Rebalance Protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants