dajac commented on code in PR #14432:
URL: https://github.com/apache/kafka/pull/14432#discussion_r1363419939


##########
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:
   I see. Would it make sense to put this condition first in the method, before 
`if (receivedMemberEpoch > member.memberEpoch())`? I got confused by the fact 
that it is within the if branch.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to