vamossagar12 commented on code in PR #14432:
URL: https://github.com/apache/kafka/pull/14432#discussion_r1363327084
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -747,6 +798,11 @@ private void throwIfMemberEpochIsInvalid(
List<ConsumerGroupHeartbeatRequestData.TopicPartitions>
ownedTopicPartitions
) {
if (receivedMemberEpoch > member.memberEpoch()) {
+ // If a static member rejoins, it's previous epoch would be -2. In
such a
+ // case, we don't need to fence the member.
+ if (member.memberEpoch() == LEAVE_GROUP_STATIC_MEMBER_EPOCH &&
receivedMemberEpoch == 0) {
+ return;
+ }
Review Comment:
This is mainly needed for the static member rejoin case. Let's say a static
member with instance id `id` departed. When it departs, we would write a member
epoch value of -2 against it. Now, if a new static member joins with the same
instance id `id` and a member epoch value of 0, then without this condition,
the rejoin would always fail with `FencedMemberEpochException`. This condition
was added to avoid the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]