Skip to content
Compare
Choose a tag to compare

This is a major release and contains backwards incompatible changes.

Changes

  • Log compaction is natively supported (3ee2c46)

Bugfixes

  • The log API is fuzz tested. Just run: make fuzzer_tests. Several edge cases have been identified and fixed. The bugs were mostly related to log wrapping. (f0a2279, b912ff5)
  • Fixed a rare chance of prevLogIdx < commit index breaking operations (396f7b7)
Compare
Choose a tag to compare

This is a major release and contains backwards incompatible changes.

Compare
Choose a tag to compare

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 your msg_entry_t struct then you could consider this a backwards compatible change.
  • applylog now takes a raft_entry_t* instead of char* data, int size.
  • All functions that take int node now take raft_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
Compare
Choose a tag to compare

This is a major release and contains many bug fixes. This release should be considered very stable.

The next release will contain many backwards incompatible changes as we prepare to add membership changes.

Backwards incompatible changes:

  • Remove raft_get_my_id
  • Remove num_nodes from raft_entry_t
  • raft_entry_t and msg_entry_t are now identical

Changes

  • Use matchIndex from RAFT paper to update commitIndex
  • Apply entries lazily even if leader.
  • Become leader if num_nodes == 1 and auto commit if num_nodes == 1
  • Change random timeout to be influenced by election_timeout
  • Add raft_node_get_match_idx
  • Add raft_get_last_log_term
  • [performance] Aggressively send appendentries - This allows slow clients to recover quickly
  • [performance] Recventry doesn't send appendentries to slow nodes
  • [performance] Recv appendentries_response next_idx jumps back - To speed up deciding on the correct next_idx, the leader will now use the current_idx provided by the peer node in deciding the next_idx.

Bugfixes:

  • [requestvote] Fix voted_for bug
  • [appendentries] Fix bug where non-leader receives AE response
  • [appendentries] Fix memory not being copied properly bug
  • Fix log_pop bug
  • [appendentries] Fix commit_idx being set by raft_apply_entry
  • [appendentries] Fix entries not having their term checked
  • Prevent Dupe entries
  • [appendentries] Ignore appendentry response if matchIdx is enough
  • Fixed partitions created by rogue leaders
  • [requestvote] Step down if requestvote response has higher term
  • [appendentries] Prevent commit_idx increasing on minority
  • [appendentries] Force step down in appendentries for all state
  • Server ignores old response messages
  • last_log_term is based off log rather than current term
  • Fix leader stepping down erroneously
  • [requestvote] Add improved vote granting logic
  • [appendentries] Candidate steps down if appendentries has same term
  • [requestvote] Add timeout when receiving requestvote
  • [appendentries] Do not commit logs of old terms
  • [requestvote] Only candidates read requestvote responses
Compare
Choose a tag to compare
Added documentation to mention that user is responsible for managing
memory.
Compare
Choose a tag to compare
Compare
Choose a tag to compare