vamossagar12 commented on code in PR #12561: URL: https://github.com/apache/kafka/pull/12561#discussion_r959527478
########## connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignor.java: ########## @@ -307,9 +307,31 @@ ClusterAssignment performTaskAssignment( existing.tasks().addAll(assignment.tasks()); } ); - canRevoke = toExplicitlyRevoke.size() == 0; + + // If this round and the previous round involved revocation, we will do an exponential + // backoff delay to prevent rebalance storms. + if (revokedInPrevious && !toExplicitlyRevoke.isEmpty()) { + numSuccessiveRevokingRebalances++; + long processAfter = consecutiveRevokingRebalancesBackoff.backoff(numSuccessiveRevokingRebalances); + log.debug("Consecutive revoking rebalances observed. Need to wait for {} ms", processAfter); + time.sleep(processAfter); // Is it a good idea to sleep? Review Comment: I have made the changes to use the existing delay/scheduledRebalance mechanism to delay the revocation. -- 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