vamossagar12 commented on code in PR #12561: URL: https://github.com/apache/kafka/pull/12561#discussion_r965066363
########## connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignor.java: ########## @@ -285,18 +292,13 @@ ClusterAssignment performTaskAssignment( handleLostAssignments(lostAssignments, newSubmissions, completeWorkerAssignment); + if (delay > 0) { + log.debug("Delaying {}ms for revoking tasks.", delay); + } // Do not revoke resources for re-assignment while a delayed rebalance is active - // Also we do not revoke in two consecutive rebalances by the same leader - canRevoke = delay == 0 && canRevoke; - - // Compute the connectors-and-tasks to be revoked for load balancing without taking into - // account the deleted ones. - log.debug("Can leader revoke tasks in this assignment? {} (delay: {})", canRevoke, delay); - if (canRevoke) { + if (delay == 0) { Map<String, ConnectorsAndTasks> toExplicitlyRevoke = - performTaskRevocation(activeAssignments, currentWorkerAssignment); - - log.debug("Connector and task to revoke assignments: {}", toRevoke); + performTaskRevocation(configured, completeWorkerAssignment); Review Comment: @C0urante When you say `I wonder if we can leave this change out for now` do you mean retaining this or switching back to using `activeAssignments` instead of `configured`? I will also take a look at the scenario you described about where this might fail. If we want to retain this, I can take a look at them in a separate PR or this one, whatever is decided over here or if we want to switch back to `activeAssignments`, then that would need more work probably in this PR. -- 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