C0urante commented on code in PR #11983:
URL: https://github.com/apache/kafka/pull/11983#discussion_r863330276


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignor.java:
##########
@@ -336,13 +332,16 @@ ClusterAssignment performTaskAssignment(
         log.debug("Incremental connector assignments: {}", 
incrementalConnectorAssignments);
         log.debug("Incremental task assignments: {}", 
incrementalTaskAssignments);
 
+        Map<String, Collection<String>> revokedConnectors = 
transformValues(toRevoke, ConnectorsAndTasks::connectors);
+        Map<String, Collection<ConnectorTaskId>> revokedTasks = 
transformValues(toRevoke, ConnectorsAndTasks::tasks);
+
         return new ClusterAssignment(
                 incrementalConnectorAssignments,
                 incrementalTaskAssignments,
-                transformValues(toRevoke, ConnectorsAndTasks::connectors),
-                transformValues(toRevoke, ConnectorsAndTasks::tasks),
-                connectorAssignments,
-                taskAssignments
+                revokedConnectors,
+                revokedTasks,
+                diff(connectorAssignments, revokedConnectors),
+                diff(taskAssignments, revokedTasks)

Review Comment:
   I don't think so; it looks like we compute load-balancing revocations later 
on, around line 300. At line 279, the `completeWorkerAssignment` that we derive 
`connectorAssignments` and `taskAssignments` from only has the `deleted` 
connectors and tasks removed from it; everything else (including load-balancing 
revocations and duplicated assignments) is still included.



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