showuon commented on a change in pull request #10367:
URL: https://github.com/apache/kafka/pull/10367#discussion_r598078620
##########
File path:
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignor.java
##########
@@ -248,6 +227,10 @@ private Long ensureLeaderConfig(long maxOffset,
WorkerCoordinator coordinator) {
toRevoke.putAll(computeDuplicatedAssignments(memberConfigs,
connectorAssignments, taskAssignments));
log.debug("Connector and task to revoke assignments (include
duplicated assignments): {}", toRevoke);
+ List<WorkerLoad> currentWorkerAssignmentWithoutDuplication =
+ removeDuplicated(workerAssignment(memberConfigs, deleted),
toRevoke);
+ log.debug("Complete (excluding deletions and remove duplicated
assignments) worker assignments: {}",
currentWorkerAssignmentWithoutDuplication);
Review comment:
change (2): compute the current worker assignment excluding deletions
and duplicated assignments. If after excluding deletion and duplicated
assignments, there are still workers have assignment higher than
totalTasksWeHave / totalWorkers, we still need to revoke more tasks.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]