dongnuo123 commented on code in PR #17976:
URL: https://github.com/apache/kafka/pull/17976#discussion_r1866397333
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -6128,11 +6183,11 @@ private CoordinatorResult<LeaveGroupResponseData,
CoordinatorRecord> classicGrou
// in which case we expect the MemberId to be undefined.
if (!UNKNOWN_MEMBER_ID.equals(memberId)) {
throwIfInstanceIdIsFenced(member, groupId, memberId,
instanceId);
+ throwIfMemberDoesNotUseClassicProtocol(member);
Review Comment:
Should we check `validateOnlineDowngradeWithFencedMember` if a consumer
member leaves the group though admin client?
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -3224,6 +3228,59 @@ private void replaceMember(
));
}
+ /**
+ * Maybe delete the resolved regular expression associated to the provided
member if
+ * it was the last subscribed member to it.
+ *
+ * @param records The record accumulator.
+ * @param group The group.
+ * @param member The member removed from the group.
+ */
+ private void maybeDeleteResolvedRegularExpression(
+ List<CoordinatorRecord> records,
+ ConsumerGroup group,
+ ConsumerGroupMember member
+ ) {
+ if (isNotEmpty(member.subscribedTopicRegex()) &&
group.numSubscribedMembers(member.subscribedTopicRegex()) == 1) {
+ records.add(newConsumerGroupRegularExpressionTombstone(
+ group.groupId(),
+ member.subscribedTopicRegex()
+ ));
+ }
+ }
+
+ /**
+ * Maybe delete the resolved regular expressions associated with the
provided members
+ * if they were the last ones susbcribed to them.
Review Comment:
nit: subscribed
--
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]