Copilot commented on code in PR #20288:
URL: https://github.com/apache/kafka/pull/20288#discussion_r2247967677
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -833,19 +833,28 @@ ConsumerGroup getOrMaybeCreateConsumerGroup(
* Gets or creates a streams group without updating the groups map.
* The group will be materialized during the replay.
*
+ * If there is an empty classic consumer group of the same name, it will
be deleted and a new streams
+ * group.
Review Comment:
The comment is incomplete - it ends abruptly with 'a new streams' without
completing the sentence. Should be 'a new streams group will be created.'
```suggestion
* group will be created.
```
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -833,19 +833,28 @@ ConsumerGroup getOrMaybeCreateConsumerGroup(
* Gets or creates a streams group without updating the groups map.
* The group will be materialized during the replay.
*
+ * If there is an empty classic consumer group of the same name, it will
be deleted and a new streams
+ * group.
+ *
* @param groupId The group ID.
+ * @param records The record list to which the group tombstones
are written
+ * if the group is empty and is a classic group.
*
* @return A StreamsGroup.
*
* Package private for testing.
*/
StreamsGroup getOrCreateStreamsGroup(
- String groupId
+ String groupId,
+ List<CoordinatorRecord> records
) {
Group group = groups.get(groupId);
if (group == null) {
return new StreamsGroup(logContext, snapshotRegistry, groupId,
metrics);
+ } else if (maybeDeleteEmptyClassicGroup(group, records)) {
Review Comment:
The method `maybeDeleteEmptyClassicGroup` is called but this method is not
defined in the diff. This will cause a compilation error unless the method
exists elsewhere in the codebase.
--
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]