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


##########
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:
   I've updated `validateOnlineUpgrade` to throw an exception with the 
appropriate message instead. And tweaked some of the error wording to be 
consistent with the rest.



##########
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:
   I think it's a good idea. I've updated `validateOnlineUpgrade` to throw an 
exception with the appropriate message instead. And tweaked some of the error 
wording to be consistent with the rest.



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

Reply via email to