squah-confluent commented on code in PR #24315:
URL: https://github.com/apache/kafka/pull/24315#discussion_r4710669555
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/consumer/ConsumerGroup.java:
##########
@@ -1299,8 +1299,24 @@ public static ConsumerGroup fromClassicGroup(
) {
String groupId = classicGroup.groupId();
ConsumerGroup consumerGroup = new ConsumerGroup(logContext,
snapshotRegistry, groupId);
- consumerGroup.setGroupEpoch(classicGroup.generationId());
- consumerGroup.setTargetAssignmentMetadata(classicGroup.generationId(),
0L);
+ // A classic group at generation 0 has no assignment. Like a new
group, it starts with an empty
+ // target assignment at the initial epoch.
Review Comment:
Yes, it does read as vague. I've reworded it to
```java
// When the classic group is at generation 0, the target assignment
epoch is bumped to 1, to keep
// new members out of epoch 0 when the assignor is offloaded and the
new target assignment is not
// ready yet. Epoch 0 is reserved to signal a joining member in
consumer group heartbeats and
// cannot be given to a member.
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]