Dev Branch - Failed to build a 3-node cluster
Hi,
Thank you for building such a wonderful crate. It is very interesting. However, I'm trying to run the example code, but the third node doesn't seem to join the cluster correctly, is there a problem with my command execution?
$ ./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
$ curl -XGET http://localhost:8001/put/1/AAA
$ curl -XGET http://localhost:8001/get/1
Some("AAA")
$ curl -XGET http://localhost:8002/get/1
Some("AAA")
$ curl -XGET http://localhost:8003/get/1
None
How can I solve this problem?
Thanks,
Hello @mosuka , this seems to be a bug, I am trying to locate and solve it, thanks for your feedback.
If you are interested in solving this problem, you can help review the code at https://github.com/ritelabs/riteraft/blob/0c9c97e3d6168debb4c6f31b366a0dcbe6590665/src/raft_node.rs#L336
Hello, this is a failure after we updated the raft rev & tokio-1, you can temporarily use riteraft rev="898a245".
Sorry, I will adjust the branch later to ensure availability. Now the wrong code is in the dev branch, and the code in the main branch is even a bit old, but at least the correctness is guaranteed.
I need a little time to synchronize and resolve the issue, thanks for your feedback.
Hi @PsiACE ,
Thank you for the information. I was able to start the 3-node crust and update the data. I'm looking forward to fixing the bug.
now, the third node will join the cluster, but still can’t get the correct result.