[
https://issues.apache.org/jira/browse/ZOOKEEPER-2193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14595272#comment-14595272
]
Raul Gutierrez Segales commented on ZOOKEEPER-2193:
---------------------------------------------------
Patch lgtm, +1. A few more nits though (but I wouldn't block merging on them):
In:
{code}
+ throw new
KeeperException.BadArgumentsException(String.format("%s of server.%d conflicts
%s of server.%d", my, this.id, other, s.id));
{code}
the line is too long, maybe use an intermediate assignment to make it more
readable:
{code}
String error = String.format("%s of server.%d conflicts %s of
server.%d", my, this.id, other, s.id);
throw new BadArgumentsException(error);
{code}
(also, you can just use BadArgumentsException without KeeperException. since
it's imported).
In:
{code}
+ private List<InetSocketAddress>
excludedSpecialAddress(List<InetSocketAddress> addrs) {
{code}
how about we call the method excludeSpecialAddresses given it's an action?
[~michim], [~shralex]: could you take another look as well?
Thanks [~Yasuhito Fukuda]!
> reconfig command completes even if parameter is wrong obviously
> ---------------------------------------------------------------
>
> Key: ZOOKEEPER-2193
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2193
> Project: ZooKeeper
> Issue Type: Bug
> Components: leaderElection, server
> Affects Versions: 3.5.0
> Environment: CentOS7 + Java7
> Reporter: Yasuhito Fukuda
> Assignee: Yasuhito Fukuda
> Attachments: ZOOKEEPER-2193-v2.patch, ZOOKEEPER-2193-v3.patch,
> ZOOKEEPER-2193-v4.patch, ZOOKEEPER-2193-v5.patch, ZOOKEEPER-2193-v6.patch,
> ZOOKEEPER-2193-v7.patch, ZOOKEEPER-2193.patch
>
>
> Even if reconfig parameter is wrong, it was confirmed to complete.
> refer to the following.
> - Ensemble consists of four nodes
> {noformat}
> [zk: vm-101:2181(CONNECTED) 0] config
> server.1=192.168.100.101:2888:3888:participant
> server.2=192.168.100.102:2888:3888:participant
> server.3=192.168.100.103:2888:3888:participant
> server.4=192.168.100.104:2888:3888:participant
> version=100000000
> {noformat}
> - add node by reconfig command
> {noformat}
> [zk: vm-101:2181(CONNECTED) 9] reconfig -add
> server.5=192.168.100.104:2888:3888:participant;0.0.0.0:2181
> Committed new configuration:
> server.1=192.168.100.101:2888:3888:participant
> server.2=192.168.100.102:2888:3888:participant
> server.3=192.168.100.103:2888:3888:participant
> server.4=192.168.100.104:2888:3888:participant
> server.5=192.168.100.104:2888:3888:participant;0.0.0.0:2181
> version=300000007
> {noformat}
> server.4 and server.5 of the IP address is a duplicate.
> In this state, reader election will not work properly.
> Besides, it is assumed an ensemble will be undesirable state.
> I think that need a parameter validation when reconfig.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)