mjsax commented on code in PR #23924:
URL: https://github.com/apache/kafka/pull/23924#discussion_r4560454574
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/assignor/BalancedTaskAssignor.java:
##########
@@ -124,16 +128,18 @@ public GroupAssignment assign(final GroupSpec groupSpec,
final TopologyDescriber
final ProcessTasks[] processesById = processes.values().toArray(new
ProcessTasks[0]);
final int[] period = dealPeriod(processesById);
dealTasks(processesById, period, 0, statefulTasks, process ->
process.statefulActiveTasks);
+ dealTasks(processesById, period, statefulTasks.size(), statelessTasks,
process -> process.statelessActiveTasks);
Review Comment:
Hmmm... This is something we should explore more. Seems we don't have a
uniform strategy, and it's not clear to me if one order is strictly better than
the other, or if it really depends on "sticky" vs "balances" which one is
better...
My gut feeling is, that placing all stateful task (first active, than
standby) before all stateless tasks might better: if should distribute overall
state better, and lead to fewer state movements during a rebalance (if active
tasks are not assigned yet, there is more freedom to assign standbys "sticky"
because there is no members with exhausted capacity yet).
In classic, HA-assignor uses active-stateful, standby, stateless order. Both
sticky (new and legacy) use active-stateful, stateless, standby order.
The new sticky for "streams" also uses active-stateful, stateless, standby
order.
Thoughts?
--
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]