dajac commented on code in PR #15533: URL: https://github.com/apache/kafka/pull/15533#discussion_r1530481757
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java: ########## @@ -1190,10 +1190,11 @@ private CoordinatorResult<ConsumerGroupHeartbeatResponseData, Record> consumerGr .setHeartbeatIntervalMs(consumerGroupHeartbeatIntervalMs); // The assignment is only provided in the following cases: - // 1. The member reported its owned partitions; - // 2. The member just joined or rejoined to group (epoch equals to zero); - // 3. The member's assignment has been updated. - if (ownedTopicPartitions != null || memberEpoch == 0 || hasAssignedPartitionsChanged(member, updatedMember)) { + // 1. The member sent a full request. It does so when joining or rejoining the group; or + // on any errors (e.g. timeout). + // 2. The member's assignment has been updated. + boolean isFullRequest = memberEpoch == 0 || (rebalanceTimeoutMs != -1 && subscribedTopicNames != null && ownedTopicPartitions != null); Review Comment: @jolshan Yes. You're understanding is correct. I updated the comment to explain it as it was explained in the description. ########## group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java: ########## @@ -1650,6 +1650,102 @@ public void testShouldThrowFencedInstanceIdExceptionWhenStaticMemberWithDifferen .setTopicPartitions(Collections.emptyList()))); } + @Test + public void testConsumerGroupHeartbeatFullResponse() { + String groupId = "fooup"; + String memberId = Uuid.randomUuid().toString(); + + Uuid fooTopicId = Uuid.randomUuid(); + String fooTopicName = "foo"; + + // Create a context with one consumer group containing two members. Review Comment: Updated the comment. -- 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