squah-confluent commented on code in PR #21013:
URL: https://github.com/apache/kafka/pull/21013#discussion_r2570523621


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -3307,6 +3307,10 @@ private UpdateRegularExpressionsResult 
maybeUpdateRegularExpressions(
                     // We also trigger a refresh of the regexes in order to 
resolve it.
                     
throwIfRegularExpressionIsInvalid(updatedMember.subscribedTopicRegex());
                     requireRefresh = true;
+
+                    if (isNotEmpty(oldSubscribedTopicRegex) && 
group.numSubscribedMembers(oldSubscribedTopicRegex) != 0) {
+                        updateRegularExpressionsResult = 
UpdateRegularExpressionsResult.REGEX_UPDATED_AND_RESOLVED;
+                    }

Review Comment:
   We're changing the return value in the wrong branch of the code. We want the 
branch where `newSubscribedTopicRegex` is empty.



##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -1464,8 +1464,8 @@ public void 
testStaticMemberGetsBackAssignmentUponRejoin() {
             .setSubscribedTopicNames(List.of("foo", "bar"))
             .setServerAssignorName("range")
             .setAssignedPartitions(mkAssignment(
-                    mkTopicAssignment(fooTopicId, 3, 4, 5),
-                    mkTopicAssignment(barTopicId, 2)))
+                mkTopicAssignment(fooTopicId, 3, 4, 5),
+                mkTopicAssignment(barTopicId, 2)))

Review Comment:
   Could we avoid changing the formatting of unrelated tests?



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