1. 24 May, 2018 2 commits
  2. 23 May, 2018 2 commits
  3. 17 May, 2018 4 commits
  4. 16 May, 2018 7 commits
  5. 13 May, 2018 1 commit
  6. 06 May, 2018 1 commit
  7. 02 May, 2018 1 commit
  8. 25 Apr, 2018 1 commit
  9. 11 Apr, 2018 2 commits
  10. 07 Mar, 2018 2 commits
    • Yossi Gottlieb's avatar
      Ignore RequestVote when leader is established. · 6cac5767
      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.
      6cac5767
    • Yossi Gottlieb's avatar
      Remove duplicate raft_get_last_applied_entry(). · 5e3cde59
      Yossi Gottlieb authored
      This fails the fuzzer tests.
      5e3cde59
  11. 04 Mar, 2018 2 commits
    • Yossi Gottlieb's avatar
      Add a per-entry custom user data field. · 519d47ad
      Yossi Gottlieb authored
      This is useful to allow leaders to pass context between
      raft_recv_entry() and a subsequent execution of the entry (after it was
      committed) as an applylog callback.
      
      This allows an optimized use pattern when entries received locally on
      the leader can be used without going through an unnecessary
      deserialization.
      519d47ad
    • Yossi Gottlieb's avatar
      Add custom heap management hooks. · b4430b25
      Yossi Gottlieb authored
      b4430b25
  12. 09 Jan, 2018 2 commits
  13. 08 Jan, 2018 4 commits
  14. 29 Dec, 2017 2 commits
  15. 21 Nov, 2017 7 commits
    • Willem Thiart's avatar
      Add make infer · f0a22790
      Willem Thiart authored
      f0a22790
    • Li Wei's avatar
      DAOS-333 include: Export raft_become_follower() · a7a8291e
      Li Wei authored
      
      
      Move the declaration of raft_become_follower() from raft_private.h to
      raft.h, so that users may voluntarily give up leadership.
      Signed-off-by: default avatarLi Wei <wei.g.li@intel.com>
      a7a8291e
    • Li Wei's avatar
      DAOS-333 server: Handle storage access errors · 76d56d0c
      Li Wei authored
      
      
      User storage callbacks may return negative errors smaller than
      RAFT_ERR_LAST. These will be returned all the way to the API methods,
      which report the errors back to users, so that appropriate handlings may
      be performed.
      Signed-off-by: default avatarLi Wei <wei.g.li@intel.com>
      76d56d0c
    • Li Wei's avatar
      DAOS-333 server: Don't remove later entries for matching AEs · 77fb6117
      Li Wei authored
      
      
      If an AE request's previous entry matches the follower's, then the
      follower doesn't need to truncate its log at prev_log_idx. When the
      follower checks if the other entries in the AE request are consistent
      with its local ones, it already takes care of truncating at any
      inconsistency. If any later entries not covered by this AE request are
      inconsistent, future AE requests shall truncate them.
      Signed-off-by: default avatarLi Wei <wei.g.li@intel.com>
      77fb6117
    • Li Wei's avatar
      Revert "Change: code now assumes callbacks are provided" · e33da84a
      Li Wei authored
      This reverts commit c3443aac. Test
      changes are left intact.
      e33da84a
    • Li Wei's avatar
      DAOS-279 server: Zero timeout_elapsed for leaders · 51e049fd
      Li Wei authored
      
      
      If raft_become_candidate() assigns a negative value e (i.e.,
      -election_timeout < e < 0) to timeout_elapsed, and if this replica
      successfully becomes the leader, then this leader won't send heartbeats
      for request_timeout - e milliseconds. This may be longer than
      election_timeout and cause an unnecessary leadership change.
      
      This patch zeroes timeout_elapsed in raft_become_leader(), randomizes
      election timeouts in [election_timeout, 2 * election_timeout), and fixes
      raft_recv_appendentries() to avoid zeroing timeout_elapsed if the AE
      request has an older term.
      Signed-off-by: default avatarLi Wei <wei.g.li@intel.com>
      51e049fd
    • Li Wei's avatar
      DAOS-279 server: Discard current_leader when term changes · 14a4e6a2
      Li Wei authored
      
      
      When a leader learns of a newer term and steps down, it should discard
      current_leader. Otherwise, a client request may be rejected with
      RAFT_ERR_NOT_LEADER and a hint pointing to this replica itself!
      
      For simplicity, this patche follows the Raft paper to discard
      current_leader whenever current_term changes. And, when receiving an AE
      with an up-to-date term, a server always updates current_leader, as this
      information is absolute, even if the previous entry doesn't match.
      
      This patch also fixes a test that has previously been failing due to
      incorrect node IDs.
      Signed-off-by: default avatarLi Wei <wei.g.li@intel.com>
      14a4e6a2