squah-confluent commented on code in PR #18046:
URL: https://github.com/apache/kafka/pull/18046#discussion_r1871373379


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -1053,6 +1055,12 @@ ConsumerGroup convertToConsumerGroup(ClassicGroup 
classicGroup, List<Coordinator
 
             throw new GroupIdNotFoundException("Cannot upgrade the classic 
group " + classicGroup.groupId() +
                 " to consumer group because the embedded consumer protocol is 
malformed.");
+        } catch (UnsupportedVersionException e) {
+            log.warn("Cannot upgrade the classic group " + 
classicGroup.groupId() +
+                " to consumer group: " + e.getMessage() + ".", e);
+
+            throw new GroupIdNotFoundException("Cannot upgrade the classic 
group " + classicGroup.groupId() +
+                " to consumer group because a custom assignor is in use.");

Review Comment:
   > Completely unrelated but I wonder if we always provide such good error 
message when the upgrade is not possible. Do you mind checking?
   
   I had a look and there are three reasons in 
[`validateOnlineUpgrade`](https://github.com/apache/kafka/blob/e99561e1f30a30f9b151669a78d340f286a3ead6/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java#L1008-L1023)
 that we convert to "Group %s is not a consumer group":
    * Cannot upgrade classic group {} to consumer group because the online 
upgrade is disabled.
    * Cannot upgrade classic group {} to consumer group because the group does 
not use the consumer embedded protocol.
    * Cannot upgrade classic group {} to consumer group because the group size 
exceeds the consumer group maximum size.
   
   Apart from that and SchemaException when subscriptions or metadata are 
malformed, I can't see any other error paths directly related to the upgrade.



-- 
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

Reply via email to