5kbpers / kv-service-with-libs Goto Github PK
View Code? Open in Web Editor NEWImplement 6.824 lab2 & lab3 with grpc-rs & raft-rs & rust-rocksdb
License: MIT License
Implement 6.824 lab2 & lab3 with grpc-rs & raft-rs & rust-rocksdb
License: MIT License
Hi @5kbpers ,
Thanks for sharing a great example to learn how to use raft-rs.
Could you please add a LICENSE file to let us know under what open source license you distribute this.
I tried a 3-node cluster. It seems work successfully. But when I restart one of the nodes in the cluster, the node couldn't join to cluster successfully.
The executed command is as follows:
$ ./kv-server -A 0.0.0.0:3001 -I 1 -s /tmp/kv1 -p "1=0.0.0.0:3001"
$ ./kv-server -A 0.0.0.0:3002 -I 2 -s /tmp/kv2 -p "1=0.0.0.0:3001,2=0.0.0.0:3002" -d 1
$ ./kv-server -A 0.0.0.0:3003 -I 3 -s /tmp/kv3 -p "1=0.0.0.0:3001,2=0.0.0.0:3002,3=0.0.0.0:3003" -d 1
Then stop the third node and restart it again with the following command, but the following error occurs:
$ ./kv-server -A 0.0.0.0:3003 -I 3 -s /tmp/kv3 -p "1=0.0.0.0:3001,2=0.0.0.0:3002,3=0.0.0.0:3003" -d 1
start server...
id = 3
port = 3003
add to raft cluster success
listening on 0.0.0.0:3003
I'm follower
thread '<unnamed>' panicked at ' to_commit 5 is out of range [last_index 0]', /Users/m-osuka/.cargo/registry/src/github.com-1ecc6299db9ec823/raft-0.4.3/src/raft_log.rs:248:13
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread 'grpc-poll-0' panicked at 'send message to raft error: sending on a closed channel', src/server/mod.rs:291:17
Is there any wrong in the above commands?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.