1. 08 Aug, 2022 1 commit
  2. 21 Jul, 2022 2 commits
  3. 07 Jul, 2022 2 commits
  4. 05 Jul, 2022 1 commit
    • Ozan Tezcan's avatar
      Do not execute operations in periodic when auto_flush is off (#109) · 03e2f294
      Ozan Tezcan authored
      Do not execute operations in periodic when auto_flush is off 
      
      Introduced auto_flush config in #81. If auto_flush is off, application is supposed to call raft_flush() manually. This function increments commit index, applies entries and sends appendentries requests.
      
      Currently, we execute operations in raft_periodic() and raft_flush() both. When auto_flush is off, it makes sense to leave execution to raft_flush() to do it in a single place.
      03e2f294
  5. 30 Jun, 2022 1 commit
  6. 19 Jun, 2022 1 commit
  7. 19 May, 2022 1 commit
  8. 15 May, 2022 1 commit
  9. 02 May, 2022 1 commit
  10. 26 Apr, 2022 1 commit
  11. 25 Apr, 2022 1 commit
  12. 18 Apr, 2022 1 commit
  13. 06 Apr, 2022 1 commit
  14. 04 Apr, 2022 1 commit
  15. 03 Apr, 2022 1 commit
  16. 30 Mar, 2022 2 commits
  17. 24 Mar, 2022 1 commit
  18. 21 Mar, 2022 1 commit
  19. 13 Mar, 2022 5 commits
  20. 08 Mar, 2022 1 commit
  21. 06 Mar, 2022 1 commit
  22. 15 Feb, 2022 1 commit
  23. 07 Feb, 2022 1 commit
  24. 07 Dec, 2021 1 commit
  25. 17 Nov, 2021 1 commit
  26. 16 Nov, 2021 1 commit
    • Yossi Gottlieb's avatar
      Properly get coverage from all tests. (#70) · ada3d6a0
      Yossi Gottlieb authored
      * Add COVERAGE=1 Makefile option to build libraft with coverage.
      * Refactor CFFI module to use the existing shared object in an
        out-of-line configuration, so there's no need to build and re-build
        it.
      * Makefile adjustments to build the module CFFI as needed.
      * Remove raft_get_snapshot_entry_idx, a prototype for an undefined
        function that breaks CFFI.
      * Add a gcov Makefile target to fetch both unit tests and integration
        test coverage in one shot.
      ada3d6a0
  27. 15 Nov, 2021 1 commit
  28. 14 Nov, 2021 1 commit
  29. 11 Nov, 2021 1 commit
  30. 03 Nov, 2021 1 commit
    • Shaya Potter's avatar
      set next_idx on each succesful raft_send_appendentries call (#65) · 02bdf818
      Shaya Potter authored
      this is to avoid sending duplicate entries each time raft_send_appendentries is called, just because they haven't been acked yet.
      
      it will still be reset backwards upon the leader receiving a raft_recv_appendentries_response() with a failure mode
      
      + a test for next_idx on append entry, which changes a number of tests which checked for this
      
      in order to do this, I had to modify the existing mock callback to return 0 instead of 1.  this needs to be verified
      
      + fixes for raft tests that this change exposed
      
      1) when we issues a sequence of entries, each was given an increasing term, so had entries whose term was higher than leaders term
      
      so had to fix that
      
      2) by setting the term of appendentries_repsonse to not be equal to leaders term (because of fix above), we now fail on receiving them
      
      do all that by not allowing raft_append_entry to append an entry that break raft semantics (i.e. term of entry > log term), but this breaks many tests that don't set term, so set them
      02bdf818
  31. 20 Oct, 2021 2 commits
  32. 12 Oct, 2021 1 commit
    • Shaya Potter's avatar
      fix recording of voter change idx entry (#62) · a02be774
      Shaya Potter authored
      this was recorded in 2 places, inconsistently, when it only neededed to be recorded once.
      
      it was in raft_recv_entry() as
      
          if (raft_entry_is_voting_cfg_change(ety))
              me->voting_cfg_change_log_idx = raft_get_current_idx(me_);
      
      and in
      
      raft_append_entry() as
      
      me->voting_cfg_change_log_idx = raft_get_current_idx(me_) - 1;
      
      it only should be in raft_append_entry() becaues raft_recv_entry() is only from the leader, but its value was wrong, while raft_recv_entry() was correct.  This is also why it generally worked, if no leader election happened, it always had correct value, but if a new leader was elected that would have to commit this entry, it be wrong.
      a02be774