PsiACE / riteraft

RiteRaft - A raft framework, for regular people
Apache License 2.0
320 stars 22 forks source link

3 Node Memstore Example - Elections Not Finding Leader #9

Closed felixjchen closed 1 year ago

felixjchen commented 3 years ago

I'm using the memstore example and starting 3 nodes like so:

./target/debug/riteraft-memstore --raft-addr=0.0.0.0:5001 --web-server=0.0.0.0:8001
./target/debug/riteraft-memstore --raft-addr=0.0.0.0:5002 --web-server=0.0.0.0:8002 --peer-addr=0.0.0.0:5001
./target/debug/riteraft-memstore --raft-addr=0.0.0.0:5003 --web-server=0.0.0.0:8003 --peer-addr=0.0.0.0:5001

When I kill the first process (5001), the last two don't seem to be figuring out a new leader. Elections seem to be triggering over and over, neither (5002, 5003) wins the election, but they do seem to be requesting votes from each other.

Am I passing the wrong arguments ?

Thanks for the help

bbros-dev commented 3 years ago

@felixjchen this may be related to the raft rev & tokio-1 update, can you try riteraft rev="898a245" and see if things work as you expect?

Possible duplicate of Issue #8.
If that revision works can you consider closing this issue and following developments in issue #8?

jopemachine commented 1 year ago

Possible duplicate of Issue https://github.com/ritelabs/riteraft/issues/8. If that revision works can you consider closing this issue and following developments in issue https://github.com/ritelabs/riteraft/issues/8?

It is not related to #8. If anyone is interested in resolving this issue, I think refering this https://github.com/lablup/riteraft-py/pull/10 could be helpful.