cmccabe commented on code in PR #15986:
URL: https://github.com/apache/kafka/pull/15986#discussion_r1619520419


##########
raft/src/main/java/org/apache/kafka/raft/internals/VoterSet.java:
##########
@@ -55,15 +57,41 @@ final public class VoterSet {
     }
 
     /**
-     * Returns the socket address for a given voter at a given listener.
+     * Returns the node information for all the given voter ids and listener.
      *
-     * @param voter the id of the voter
-     * @param listener the name of the listener
-     * @return the socket address if it exists, otherwise {@code 
Optional.empty()}
+     * @param voterIds the ids of the voters
+     * @param listenerName the name of the listener
+     * @return the node information for all of the voter ids
+     * @throws IllegalArgumentException if there are missing endpoints
      */
-    public Optional<InetSocketAddress> voterAddress(int voter, String 
listener) {
-        return Optional.ofNullable(voters.get(voter))
-            .flatMap(voterNode -> voterNode.address(listener));
+    public Set<Node> voterNodes(Stream<Integer> voterIds, ListenerName 
listenerName) {

Review Comment:
   This seems like the wrong behavior to me for the case where one of the 
voters doesn't have a specific listener, but the other ones do. Wouldn't we 
want to continue to use the other, working voters in that case?



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

Reply via email to