dajac commented on code in PR #22457:
URL: https://github.com/apache/kafka/pull/22457#discussion_r3396211736
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -1394,6 +1394,23 @@ private void validateOnlineUpgrade(ClassicGroup
classicGroup) {
}
}
+ /**
+ * Validates whether a classic member is allowed to join or rejoin the
consumer group. When the
+ * migration policy is disabled, no classic member may join or rejoin the
consumer group.
+ *
+ * @param consumerGroup The consumer group the classic member wants to
join.
+ * @throws GroupIdNotFoundException if the classic member cannot join the
consumer group.
+ */
+ private void throwIfClassicMemberCannotJoinConsumerGroup(ConsumerGroup
consumerGroup) {
+ if (config.consumerGroupMigrationPolicy() ==
ConsumerGroupMigrationPolicy.DISABLED) {
+ log.info("Cannot join the consumer group {} with the classic
protocol because the group migration is disabled.",
+ consumerGroup.groupId());
+ throw new GroupIdNotFoundException(
Review Comment:
I just realized that `GROUP_ID_NOT_FOUND` is not used on the JoinGroup path
at all and the client does not seem to handle it. Should we rather use
`INCONSISTENT_GROUP_PROTOCOL`? It seems that we already use it
`throwIfClassicProtocolIsNotSupported`. What do you think?
--
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]