Hoverbear / old-raft-rs

[Incomplete] A Raft implementation in Rust
https://hoverbear.github.io/raft-rs/raft/
MIT License
266 stars 41 forks source link

LeaderState should work with non-contiguous node ids #7

Closed danburkert closed 9 years ago

danburkert commented 9 years ago

This PR fixes a couple of issues with LeaderState:

1) The default value for next_index of followers should be the Leader's latest_index as of the election, not 0. 2) The LeaderState should keep next_index and match_index values in a map instead of a vec, since node id's can be non-contiguous, and may not start at 0.

Hoverbear commented 9 years ago

Hi! Thanks, we talked on irc and I like where this is going, however after speaking we decided to take a bit of a different route. I'll close this and we'll work towards trimming out u64 ids all together and move to using SocketAddrs