kezhuw commented on code in PR #2117: URL: https://github.com/apache/zookeeper/pull/2117#discussion_r1525722656
########## zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java: ########## @@ -322,8 +342,25 @@ private void initializeWithAddressString(String addressStr, Function<InetSocketA try { clientAddr = new InetSocketAddress(clientHostName, Integer.parseInt(clientParts[clientParts.length - 1])); } catch (NumberFormatException e) { - throw new ConfigException("Address unresolved: " + hostname + ":" + clientParts[clientParts.length - 1]); + throw new ConfigException("Address unresolved: " + clientHostName + ":" + clientParts[clientParts.length - 1]); + } + } + + if (serverClientParts.length == 3 && !serverClientParts[2].isEmpty()) { Review Comment: Should we make this forward compatible to tolerate possible new section from future and backport it to old releases ? I guess it might be safe in cluster upgrade as we probably don't allow downgrade. But at least, I would expect Curator, which use `QuorumMaj(Properties props)` to parse ensemble config, will fail here. Not sure other downstream third-party projects. https://github.com/apache/curator/blob/972fffac7cf76fd5e6aadf586e6d2959b3750c76/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java#L190 ``` org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: 10.1.2.3:2888:3888:participant;10.2.3.4:2181;10.2.3.4:2188 does not have the form server_config or server_config;client_config where server_config is the pipe separated list of host:port:port or host:port:port:type and client_config is port or host:port at org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer.initializeWithAddressString(QuorumPeer.java:340) at org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer.<init>(QuorumPeer.java:279) at org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer.<init>(QuorumPeer.java:274) at org.apache.zookeeper.server.quorum.flexible.QuorumMaj.<init>(QuorumMaj.java:92) ``` Or it is third-party libraries' responsibility to accommodate this ? -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org