KAFKA-20066: Implement KIP-1251: Assignment epochs for consumer groups [1/N]#21557
KAFKA-20066: Implement KIP-1251: Assignment epochs for consumer groups [1/N]#21557lucliu1108 wants to merge 7 commits intoapache:trunkfrom
Conversation
squah-confluent
left a comment
There was a problem hiding this comment.
Thanks for filing the PR!
| // 2. The member's assignment has been updated. | ||
| boolean isFullRequest = subscribedTopicNames != null; | ||
| if (memberEpoch == 0 || isFullRequest || hasAssignedPartitionsChanged(member, updatedMember)) { | ||
| if (memberEpoch == 0 || isFullRequest || ShareGroupMember.hasAssignedPartitionsChanged(member, updatedMember)) { |
There was a problem hiding this comment.
For symmetry, could we also qualify the hasAssignedPartitionsChanged call in consumerGroupHeartbeat?
|
|
||
| /** | ||
| * The partitions assigned to this member. | ||
| */ | ||
| private final Map<Uuid, Set<Integer>> assignedPartitions; |
There was a problem hiding this comment.
I think this declaration belongs in between the builder and constructor, like in ConsumerGroupMember.
|
nit: @lucliu1108 if you want to prefill the Reviewers header, use the |
|
Thanks for the review! Considering that |
|
@lucliu1108 That's unfortunate. I would probably duplicate |
|
Thanks @squah-confluent |
Summary
This PR moves
assignedPartitionsout ofModernConsumerMemberinterface, add it as independent properties for
ShareGroupMemberandConsumerGroupMember.Reason for the change
In an upcoming PR, the structure of
ConsumerGroupMember#assignedPartitionsandConsumerGroupMember#partitionsPendingRevocationwill be changed toinclude epoch information as
This differs from the
ShareGroupMember#assignedPartitionsstructure,which remains
Map<Uuid, Set<Integer>>. Therefore, it is no longerappropriate to have this as a shared field in the base class.
Reviewers: Sean Quah squah@confluent.io, Lucas Brutschy
lbrutschy@confluent.io