AndrewJSchofield commented on code in PR #18848:
URL: https://github.com/apache/kafka/pull/18848#discussion_r1954416039


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -822,21 +834,60 @@ public 
CompletableFuture<DeleteGroupsResponseData.DeletableGroupResultCollection
         });
 
         groupsByTopicPartition.forEach((topicPartition, groupList) -> {
-            
CompletableFuture<DeleteGroupsResponseData.DeletableGroupResultCollection> 
future =
-                runtime.scheduleWriteOperation(
-                    "delete-groups",
-                    topicPartition,
-                    Duration.ofMillis(config.offsetCommitTimeoutMs()),
-                    coordinator -> coordinator.deleteGroups(context, groupList)
-                ).exceptionally(exception -> handleOperationException(
-                    "delete-groups",
-                    groupList,
-                    exception,
-                    (error, __) -> 
DeleteGroupsRequest.getErrorResultCollection(groupList, error),
-                    log
-                ));
-
-            futures.add(future);
+            
CompletableFuture<DeleteGroupsResponseData.DeletableGroupResultCollection> 
shareFuture = deleteShareGroups(topicPartition, groupList)

Review Comment:
   I really don't like that fact that we will obliterate the share-group state 
before checking whether the group is actually empty. This seems like a 
fundamental flaw to arranging the code like this.
   
   Can the persister being invoked from the `GroupCoordinatorShard` instead?



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