mjsax commented on code in PR #23924:
URL: https://github.com/apache/kafka/pull/23924#discussion_r4560487403


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/assignor/BalancedTaskAssignor.java:
##########
@@ -300,10 +366,14 @@ private static ProcessTasks 
pollLeastLoadedProcessWithoutTask(final PriorityQueu
 
     /**
      * Moves tasks from more loaded to less loaded processes until no single 
move reduces the skew of the per-member
-     * task load any further. A task is never moved to a process that already 
holds it as active or standby task.
+     * task load any further. A task is never moved to a process that already 
holds it as active or standby task, nor,
+     * with {@code rackDiversity}, so that its rack diversity drops.
+     *
+     * @param rackDiversity The rack diversity of the tasks, or {@code null} 
without {@code rack.aware.assignment.tags}.
      */
-    private static void balanceTasksOverProcesses(final 
Collection<ProcessTasks> processes,
-                                                  final Function<ProcessTasks, 
SortedSet<TaskId>> tasksToBalance) {
+    static void balanceTasksOverProcesses(final Collection<ProcessTasks> 
processes,
+                                          final Function<ProcessTasks, 
SortedSet<TaskId>> tasksToBalance,
+                                          final RackDiversity rackDiversity) {

Review Comment:
   ```suggestion
       static void balanceTasksOverProcesses(
           final Collection<ProcessTasks> processes,
           final Function<ProcessTasks, SortedSet<TaskId>> tasksToBalance,
           final RackDiversity rackDiversity
       ) {
   ```



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