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


##########
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:
   We might not have deeply explored this specific edge case before. There are 
generally three approaches to handle it
   
   1. Throw Exception
   2. Random Pickup
   3. Pending (Unassigned)
   
   Option 2 seems the most robust for production, as it prioritizes system 
liveness.
   
   Or we could offer a configuration to control this logic - push back to users 
:smile: 



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