rreddy-22 commented on code in PR #16088:
URL: https://github.com/apache/kafka/pull/16088#discussion_r1619894784


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/assignor/OptimizedUniformAssignmentBuilder.java:
##########
@@ -144,216 +133,137 @@ protected GroupAssignment buildAssignment() throws 
PartitionAssignorException {
             }
         }
 
-        // The minimum required quota that each member needs to meet for a 
balanced assignment.
-        // This is the same for all members.
-        final int numberOfMembers = groupSpec.members().size();
-        final int minQuota = totalPartitionsCount / numberOfMembers;
+        // Compute the minimum required quota per member and the number of 
members
+        // who should receive an extra partition.
+        int numberOfMembers = groupSpec.members().size();
+        minimumMemberQuota = totalPartitionsCount / numberOfMembers;
         remainingMembersToGetAnExtraPartition = totalPartitionsCount % 
numberOfMembers;
 
-        groupSpec.members().keySet().forEach(memberId ->
-            targetAssignment.put(memberId, new MemberAssignment(new 
HashMap<>())
-        ));
-
-        potentiallyUnfilledMembers = assignStickyPartitions(minQuota);
-
-        unassignedPartitionsRoundRobinAssignment();
+        // Revoke the partitions which are either not part of the 
subscriptions or above

Review Comment:
   nit: // Revoke the partitions that either:
   // 1. Are not part of the member's current subscription.
   // 2. Exceed the maximum quota assigned to each member.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to