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


##########
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:
   Yeah, that makes sense as well. I placed it inside the if condition because 
this condition at hand shows up only when received epoch > current member 
epoch. But it should be ok to have it outside as you said. I have made the 
change.



-- 
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