dajac commented on code in PR #22545:
URL: https://github.com/apache/kafka/pull/22545#discussion_r3398547208


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -1456,14 +1476,19 @@ ConsumerGroup convertToConsumerGroup(ClassicGroup 
classicGroup, List<Coordinator
     }
 
     /**
-     * Removes the group.
+     * Removes the group. Fires the streams-group removal listener when the 
removed
+     * group was a streams group so the service-level back-off can release its 
entry.
      *
      * @param groupId The group id.
      */
     private void removeGroup(
         String groupId
     ) {
+        Group removed = groups.get(groupId, Long.MAX_VALUE);
         groups.remove(groupId);
+        if (removed != null && removed.type() == Group.GroupType.STREAMS) {
+            streamsGroupRemovalListener.accept(groupId);

Review Comment:
   Let's discuss this further. I would like to understand the rational. I think 
that we should try to avoid this kind of coupling from the shard to the 
service. It should be the other way around.



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