muralibasani commented on code in PR #24106:
URL: https://github.com/apache/kafka/pull/24106#discussion_r4481743196


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -5910,7 +5898,14 @@ public CoordinatorResult<Void, CoordinatorRecord> 
initializeShareGroupState(
         if (topicPartitionMap == null || topicPartitionMap.isEmpty()) {
             return new CoordinatorResult<>(List.of(), null);
         }
-        ShareGroup group = (ShareGroup) groups.get(groupId);
+        ShareGroup group;
+        try {
+            group = shareGroup(groupId);
+        } catch (GroupIdNotFoundException ex) {
+            log.debug("[GroupId {}] Could not initialize the share group state 
because the group does not exist.",

Review Comment:
   In this log line it's mentioned 'group does not exist', but shareGroup() 
also throws when the id now belongs to another group type. How abt adding 
ex.getMessage()?



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