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


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/generic/GenericGroup.java:
##########
@@ -849,6 +853,42 @@ public void validateOffsetFetch(
         }
     }
 
+    /**
+     * Validates the OffsetDelete request.
+     */
+    @Override
+    public void validateOffsetDelete() throws ApiException {
+        if (isInState(DEAD)) {

Review Comment:
   I am not sure to understand why we need to do this. Couldn't we just delete 
the group when it is empty and offsets are gone instead of transitioning to 
Dead and then deleting it?
   
   My understanding is that we use Dead in the old code because we can't remove 
the group from the map before the change is committed to the log. During this 
time, the group is in the Dead state. In our world, the group is remove from 
the map immediately and the change is reverted if the write fails.



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