jolshan commented on code in PR #15212: URL: https://github.com/apache/kafka/pull/15212#discussion_r1456314640
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/consumer/ConsumerGroup.java: ########## @@ -861,19 +861,9 @@ private void maybeUpdatePartitionEpoch( ConsumerGroupMember oldMember, ConsumerGroupMember newMember ) { - if (oldMember == null) { - addPartitionEpochs(newMember.assignedPartitions(), newMember.memberEpoch()); - addPartitionEpochs(newMember.partitionsPendingRevocation(), newMember.memberEpoch()); - } else { - if (!oldMember.assignedPartitions().equals(newMember.assignedPartitions())) { - removePartitionEpochs(oldMember.assignedPartitions()); - addPartitionEpochs(newMember.assignedPartitions(), newMember.memberEpoch()); - } - if (!oldMember.partitionsPendingRevocation().equals(newMember.partitionsPendingRevocation())) { - removePartitionEpochs(oldMember.partitionsPendingRevocation()); - addPartitionEpochs(newMember.partitionsPendingRevocation(), newMember.memberEpoch()); - } - } + maybeRemovePartitionEpoch(oldMember); Review Comment: This logic seems simpler. Why didn't we just use it before? -- 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