AndrewJSchofield commented on code in PR #22268:
URL: https://github.com/apache/kafka/pull/22268#discussion_r3231999467


##########
clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/RackAwareAssignor.java:
##########
@@ -81,7 +81,8 @@ public GroupAssignment assign(GroupSpec groupSpec, 
SubscribedTopicDescriber subs
                 }
 
                 if (assignedRack == null) {
-                    throw new PartitionAssignorException("No member found for 
racks " + racks + " for partition " + partitionId + " of topic " + topicId);
+                    // No rack-local member found, which can be transiently 
true as membership changes. Pick any member for now.
+                    assignedRack = rackIdToMemberId.keySet().iterator().next();

Review Comment:
   In the production assignor, it would never throw an exception in this 
situation. It's just being overly picky in the test case.



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