I am not seeing a new state event fired from nodes that are added to the cluster via the .join method
Scenario:
I have a 2 node skiff cluster. node1 initializes with peers set to [] and become the leader, then sets an entry in a non-skiff controlled shared database saying it is the leader
node2 starts and checks the non-skiff controlled database for the leader and starts with peers set to [leaders muliaddr], then sends an event via socket.io to node1 requesting to join and sending its multiaddr address.
node1 receives the request and initiates a .join
at this point the joined event fires on both node1 and node2 but node2 does not fire a new state event.
when taking node1 down, node2 then fires a new state indicating that it is now a candidate
is this expected behavior for the .join method? If not, what is the best method for dynamically adding peers to a cluster w/o restarting each node with a complete/updated peer list?
additionally, when using the address 127.0.0.1 for both node1 and node2 on separate processes and different ports gives the following error
Error: timedout waiting for consensus
at Timeout.onTimeout (/***/node_modules/skiff/lib/states/leader.js:122:19)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5) code: 'ETIMEOUT'
I am not seeing a
new stateevent fired from nodes that are added to the cluster via the.joinmethodScenario:
I have a 2 node skiff cluster.
node1initializes with peers set to[]and become the leader, then sets an entry in a non-skiff controlled shared database saying it is the leadernode2starts and checks the non-skiff controlled database for the leader and starts with peers set to[leaders muliaddr], then sends an event via socket.io tonode1requesting to join and sending its multiaddr address.node1receives the request and initiates a.joinat this point the
joinedevent fires on bothnode1andnode2butnode2does not fire anew stateevent.when taking
node1down,node2then fires anew stateindicating that it is now a candidateis this expected behavior for the
.joinmethod? If not, what is the best method for dynamically adding peers to a cluster w/o restarting each node with a complete/updated peer list?additionally, when using the address
127.0.0.1for bothnode1andnode2on separate processes and different ports gives the following error