vamossagar12 commented on code in PR #14647:
URL: https://github.com/apache/kafka/pull/14647#discussion_r1374326179


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignor.java:
##########
@@ -463,6 +464,14 @@ protected void handleLostAssignments(ConnectorsAndTasks 
lostAssignments,
             
lostAssignmentsToReassign.addConnectors(lostAssignments.connectors());
             lostAssignmentsToReassign.addTasks(lostAssignments.tasks());
             return;
+        } else if (maxDelay == 0) {
+            log.debug("Scheduled rebalance delays are disabled ({} = 0); "
+                    + "reassigning all lost connectors and tasks immediately",
+                    SCHEDULED_REBALANCE_MAX_DELAY_MS_CONFIG
+            );
+            
lostAssignmentsToReassign.addConnectors(lostAssignments.connectors());
+            lostAssignmentsToReassign.addTasks(lostAssignments.tasks());

Review Comment:
   nit: These 2 lines along with 
https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignor.java#L463-L464
 and 
https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignor.java#L501-L502
 are duplicates. Can we create a separate method  and move this logic there? 



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

Reply via email to