showuon commented on a change in pull request #10367:
URL: https://github.com/apache/kafka/pull/10367#discussion_r598078375
##########
File path:
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignor.java
##########
@@ -192,28 +188,11 @@ private Long ensureLeaderConfig(long maxOffset,
WorkerCoordinator coordinator) {
ConnectorsAndTasks activeAssignments = assignment(memberConfigs);
log.debug("Active assignments: {}", activeAssignments);
- // This means that a previous revocation did not take effect. In this
case, reset
- // appropriately and be ready to re-apply revocation of tasks
- if (!previousRevocation.isEmpty()) {
- if (previousRevocation.connectors().stream().anyMatch(c ->
activeAssignments.connectors().contains(c))
- || previousRevocation.tasks().stream().anyMatch(t ->
activeAssignments.tasks().contains(t))) {
- previousAssignment = activeAssignments;
- canRevoke = true;
- }
- previousRevocation.connectors().clear();
- previousRevocation.tasks().clear();
- }
-
// Derived set: The set of deleted connectors-and-tasks is a derived
set from the set
// difference of previous - configured
ConnectorsAndTasks deleted = diff(previousAssignment, configured);
log.debug("Deleted assignments: {}", deleted);
- // Derived set: The set of remaining active connectors-and-tasks is a
derived set from the
- // set difference of active - deleted
- ConnectorsAndTasks remainingActive = diff(activeAssignments, deleted);
- log.debug("Remaining (excluding deleted) active assignments: {}",
remainingActive);
Review comment:
This is not used anywhere else, so delete it.
--
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]