leo65535 opened a new pull request, #714:
URL: https://github.com/apache/ratis/pull/714
## What changes were proposed in this pull request?
When run ratis example, the script still runs normally while the peerids are
same.
```
BIN=ratis-examples/src/main/bin
PEERS=n0:127.0.0.1:6000,n0:127.0.0.1:6001,n0:127.0.0.1:6002
```
After patch
```
[dcadmin@dcadmin-work ratis]$
PEERS=n0:127.0.0.1:6000,n0:127.0.0.1:6001,n0:127.0.0.1:6002
[dcadmin@dcadmin-work ratis]$ ID=n0; ${BIN}/server.sh arithmetic server --id
${ID} --storage /tmp/ratis/test/${ID} --peers ${PEERS}
Found
/work/projects/opensource/raft/ratis/ratis-examples/target/ratis-examples-3.0.0-SNAPSHOT.jar
Exception in thread "main" java.lang.IllegalStateException: PeerId n0 has
already appeared in this group.
at
org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:72)
at
org.apache.ratis.protocol.RaftGroup.lambda$new$2(RaftGroup.java:66)
at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
at org.apache.ratis.protocol.RaftGroup.<init>(RaftGroup.java:65)
at org.apache.ratis.protocol.RaftGroup.valueOf(RaftGroup.java:38)
at
org.apache.ratis.examples.arithmetic.cli.Server.run(Server.java:77)
at org.apache.ratis.examples.common.Runner.main(Runner.java:63)
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-1673
## How was this patch tested?
(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise,
remove 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]