GithubHelp home page GithubHelp logo

5kbpers / kv-service-with-libs Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 31 KB

Implement 6.824 lab2 & lab3 with ​grpc-rs​ & ​raft-rs​ & ​rust-rocksdb

License: MIT License

Makefile 0.23% Shell 1.18% Rust 98.59%

kv-service-with-libs's People

Contributors

5kbpers avatar minghuatang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kv-service-with-libs's Issues

Add a LICENSE file

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.

Node could not join successfully when restarted

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.