ableegoldman commented on code in PR #17614: URL: https://github.com/apache/kafka/pull/17614#discussion_r2029656317
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMembershipManager.java: ########## @@ -469,8 +493,17 @@ public int joinGroupEpoch() { */ @Override public int leaveGroupEpoch() { - return groupInstanceId.isPresent() ? - ConsumerGroupHeartbeatRequest.LEAVE_GROUP_STATIC_MEMBER_EPOCH : - ConsumerGroupHeartbeatRequest.LEAVE_GROUP_MEMBER_EPOCH; + boolean isStaticMember = groupInstanceId.isPresent(); + if (REMAIN_IN_GROUP == leaveGroupOperation && isStaticMember) { Review Comment: this condition is basically redundant, right? if `isStaticMember` is true then we'll return `LEAVE_GROUP_STATIC_MEMBER_EPOCH` anyways via the final check -- 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