dajac commented on code in PR #24315:
URL: https://github.com/apache/kafka/pull/24315#discussion_r4710458518
##########
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:
nit: Could the comment say why the epoch can't stay at 0? It is the reason
for the Math.max, and it is easy to drop without it.
--
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]