dongnuo123 commented on code in PR #15662:
URL: https://github.com/apache/kafka/pull/15662#discussion_r1560315985


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -761,6 +776,58 @@ public ClassicGroup classicGroup(
         }
     }
 
+    /**
+     * Validates the online upgrade if the Classic Group receives a 
ConsumerGroupHeartbeat request.
+     *
+     * @param classicGroup A ClassicGroup.
+     * @return the boolean indicating whether it's valid to online upgrade the 
classic group.
+     */
+    private boolean validateOnlineUpgrade(ClassicGroup classicGroup) {
+        if (!consumerGroupMigrationPolicy.isUpgradeEnabled()) {
+            log.debug("Online upgrade is invalid because the consumer group {} 
migration config is {} so online upgrade is not enabled.",
+                classicGroup.groupId(), consumerGroupMigrationPolicy);
+            return false;
+        } else if (classicGroup.isInState(DEAD)) {

Review Comment:
   Yeah it makes sense. Actually I think we don't set classicGroup to dead at 
all. We can delete the else if



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