aliehsaeedii commented on code in PR #18051:
URL: https://github.com/apache/kafka/pull/18051#discussion_r1872985051
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/taskassignor/StickyTaskAssignor.java:
##########
@@ -309,7 +299,14 @@ private void assignStandby(final Set<TaskId> standbyTasks,
final int numStandbyR
// others
if (standby == null) {
- standby = findMemberWithLeastLoad(task,
availableProcesses);
+ final Set<Member> availableMembers =
availableProcesses.stream()
+ .flatMap(pId ->
processIdToState.get(pId).memberToTaskCounts().keySet().stream()
+ .map(mId -> new Member(pId,
mId))).collect(Collectors.toSet());
+ standby = findMemberWithLeastLoad(availableMembers, task,
false);
+ if (standby == null) {
+ log.warn("{} Error in standby task assignment!",
errorMessage);
+ break;
+ }
Review Comment:
fix part 2.
--
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]