akhileshchg commented on code in PR #21654:
URL: https://github.com/apache/kafka/pull/21654#discussion_r2898467815


##########
tools/src/main/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommand.java:
##########
@@ -1192,8 +1207,15 @@ static void modifyInterBrokerThrottle(Admin adminClient,
                                           Set<Integer> reassigningBrokers,
                                           long interBrokerThrottle) throws 
ExecutionException, InterruptedException {
         if (interBrokerThrottle >= 0) {
+            Set<Integer> liveBrokers = getLiveBrokerIds(adminClient);
+            Set<Integer> brokersToUpdate = reassigningBrokers.stream()
+                .filter(liveBrokers::contains)
+                .collect(Collectors.toSet());
+            if (brokersToUpdate.isEmpty()) {
+                return;
+            }
             Map<ConfigResource, Collection<AlterConfigOp>> configs = new 
HashMap<>();
-            reassigningBrokers.forEach(brokerId -> {
+            brokersToUpdate.forEach(brokerId -> {

Review Comment:
   Similar to above comment, we should print if we're unable to set or clear 
throttles for down brokers. 



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