Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0-alpha2
-
None
Description
If a node is started with this config...
{ "node": { "metastorageNodes": [ "node-0", "node-1", "node-2" ] }, "network": { "port": 3344, "netClusterNodes": [ "localhost:3344" ] } }
but with a name that is not present in metastorageNodes...
IgnitionManager.start("other-name", Files.readString(Path.of("config/ignite-config.json")))
it fails with IndexOutOfBoundsException:
INFO: Started replication server [node=ClusterNode [id=4640f6cd-f2c2-4fcf-9261-560b55190894, name=example-node, host=192.168.2.190, port=3344]] Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:373) at java.base/java.util.ArrayList.get(ArrayList.java:426) at org.apache.ignite.internal.raft.Loza.startRaftGroup(Loza.java:76) at org.apache.ignite.internal.metastorage.MetaStorageManager.<init>(MetaStorageManager.java:133) at org.apache.ignite.internal.app.IgnitionImpl.start(IgnitionImpl.java:145) at org.apache.ignite.app.IgnitionManager.start(IgnitionManager.java:45) at org.apache.ignite.example.table.TableExample.main(TableExample.java:29)
Should instead fail with a meaningful error message.
Attachments
Issue Links
- links to