You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/05/04 15:38:20 UTC

[GitHub] [kafka] dajac commented on pull request #8311: KAFKA-9434: automated protocol for alterReplicaLogDirs

dajac commented on pull request #8311:
URL: https://github.com/apache/kafka/pull/8311#issuecomment-623538567


   @tombentley Did you consider adding a loop in at the end of the `handleResponse` that would complete any non-completed future related to the current `brokerId` with an exception?
   
   ```
   // The server should send back a response for every topic. But do a sanity check anyway.
   for (Map.Entry<TopicPartitionReplica, KafkaFutureImpl<Void>> entry : futures.entrySet()) {
       TopicPartitionReplica replica = entry.getKey();
       KafkaFutureImpl<Void> future = entry.getValue();
       if (!future.isDone && replica.brokerId() == brokerId)) {
           future.completeExceptionally(new ApiException("The server response did not " +
               "contain a reference to node " + entry.getKey()));
       }
   }
   ```
   
   You're right. We have few other cases in the Admin client that suffer from the same issue. If we can find an easy way to do it, I would rather prefer doing it in this PR so we can forget about it. I will try to fix some of the others myself.


----------------------------------------------------------------
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:
users@infra.apache.org