1. 11 Jun, 2018 3 commits
    • Yossi Gottlieb's avatar
      Ignore RequestVote when leader is established. (#58) · ab96a768
      Yossi Gottlieb authored
      This behavior is described in the original Raft paper and is required to
      prevent removed nodes from disrupting the cluster.
      
      This causes other problems though, as a split node may trigger election
      which is rejected but leaves it with a future term.  The generally
      accepted solution for this appears to be the use of PreVote RPC to avoid
      election that can never succeed.
      ab96a768
    • Willem Thiart's avatar
      Add virtraft2 · aa3586ff
      Willem Thiart authored
      aa3586ff
    • Willem Thiart's avatar
      Add notify_membership_event callback · 3ff2682d
      Willem Thiart authored
      This is an optional callback.
      
      This is useful for the user to know when a node has been added/removed,
      so that something like raft_node_set_udata can be set properly.
      3ff2682d
  2. 08 Jun, 2018 1 commit
  3. 07 Jun, 2018 2 commits
    • Willem Thiart's avatar
      Remove RAFT_LOGTYPE_SNAPSHOT · 700eebe6
      Willem Thiart authored
      The RAFT_LOGTYPE_SNAPSHOT was a bad design choice. It's better to not
      have this marker entry so that users don't have to check for the log
      entry type in the callbacks. Also, loading a snapshot correctly created
      this marker entry, but the compaction side did not. It's better to
      remove this log type than to fix this asymmetry.
      
      Fixes the following edge cases:
      - Server crashes if the last snapshot index is N and a appendentries
      message pops entries all the way back to index N.
      - Server sends an appendentries message with an invalid prev_log_idx and
      prev_log_term, causing the peer to crash.
      700eebe6
    • Yossi Gottlieb's avatar
      Off by one fixes (#65) · 9de8af47
      Yossi Gottlieb authored
      * Fix off-by-one in apply_log idx.
      
      * Fix log_get_from_idx() off by one error.
      9de8af47
  4. 17 May, 2018 4 commits
  5. 16 May, 2018 3 commits
  6. 08 Jan, 2018 2 commits
  7. 29 Dec, 2017 1 commit
    • Willem Thiart's avatar
      Fix: log edge cases · b912ff5a
      Willem Thiart authored
      The raft_log API is now being fuzzed tested. This change fixes all of
      the bugs detected by the fuzzer so far.
      b912ff5a
  8. 21 Nov, 2017 11 commits
  9. 20 Nov, 2017 2 commits
  10. 22 Jun, 2017 1 commit
  11. 21 Jun, 2017 2 commits
    • Willem Thiart's avatar
      Fixes #41 · 9651a97f
      Willem Thiart authored
      Second if statement was redundant.
      9651a97f
    • Willem Thiart's avatar
      Fixes #40 · 883d0d24
      Willem Thiart authored
      raft_send_requestvote and raft_send_appendentries now return proper
      error codes.
      883d0d24
  12. 20 Jun, 2017 1 commit
    • Willem Thiart's avatar
      Fixes #37 · 3e011ae2
      Willem Thiart authored
      Avoid deleting logs because of out-of-order/quick heartbeats.
      3e011ae2
  13. 24 May, 2017 1 commit
    • Willem Thiart's avatar
      Fixes #35 · 9bdf41b5
      Willem Thiart authored
      Avoid for loop to increase performance when tallying votes for
      committing.
      9bdf41b5
  14. 09 May, 2017 1 commit
    • Willem Thiart's avatar
      Change: code now assumes callbacks are provided · c3443aac
      Willem Thiart authored
      Beforehand there were if statements to check if callbacks were provided
      by the user. This was only useful for making the test suites shorter.
      These if statements have been removed so that the core code is more
      concise.
      c3443aac
  15. 20 Oct, 2016 1 commit
  16. 31 Aug, 2016 1 commit
  17. 28 Aug, 2016 1 commit
  18. 11 Jun, 2016 2 commits