Raft version 0.5.0
This is a major release and contains some very important backwards incompatible changes. This release supports dynamic membership changes!
Backwards incompatible changes:
raft_entry_t
now has a "type" field. If you zero yourmsg_entry_t
struct then you could consider this a backwards compatible change.applylog
now takes araft_entry_t*
instead ofchar* data, int size
.- All functions that take
int node
now takeraft_node_t* node
instead. raft_recv_entry()
does not receive a node parameter anymore.
Changes
- Add appendentries message batching. Much faster replication!
- Add raft_add_non_voting_node
- raft_recv_appendentries accepts NULL node
- Add raft_apply_all
- Add raft_add_non_voting_node
- Add raft_remove_node
- Add node_has_sufficient_logs callback
- Add raft_node_is_voting
- Add raft_get_current_leader_node
- Add raft_get_node_from_idx
- Make raft_become_leader public
- Make raft_set_commit_idx public
- Make raft_get_commit_idx public
Bugfixes:
- A node voting for ID 0 doesn't break granting logic anymore
- Don't drop responses if the node's current_idx is 0
- AE response term is set to new current term determined from leader
- Prevent duped appendentries responses
- Election timeout doesn't promote single node to leader