- 18 Aug, 2021 1 commit
-
-
Ozan Tezcan authored
Implemented check-quorum
-
- 11 Aug, 2021 1 commit
-
-
Ozan Tezcan authored
-
- 06 Aug, 2021 1 commit
-
-
Ozan Tezcan authored
-
- 02 Aug, 2021 1 commit
-
-
Shaya Potter authored
major bug in terms of election as term wasn't being increased in cases of partioned network where a demote was received but not applied. + adds an assert to the existing test of promotion to leader if only voter to ensure term is incremented as fixed by this PR
-
- 01 Aug, 2021 1 commit
-
-
Ozan Tezcan authored
added initial cmake support, fixed coverage usage
-
- 30 Jul, 2021 1 commit
-
-
Shaya Potter authored
this commit changes libraft's from using the DEMOTE_NODE log entry which would then initiate a REMOVE_NODE log entry on the DEMOTE's commit, to only using a REMOVE. * add the removal of the active node flag on append of REMOVE and (add back if reverted) * modify is_voting to check for active state as well this enables simplifying appending and reverting nodes, as we shouldn't be touching voting state, (as a removing node might not be voting yet), only its active state. and as the is_voting check also now checks for active state, simplifies a lot of code that manually tested both. * add a test for reversion of a non voting node removal previously, the code could not handle demoting/removing a non voting node, as demote would want to unset the voting flag (which a non voting node obviously doesn't have), and would therefore fail an assertion. with the new code, we no longer unset the voting flag in removal, and this test make sure both the is_voting and is_active return as expected through a process of add/removal/revert
-
- 28 Jul, 2021 1 commit
-
-
Shaya Potter authored
* fix virtraft bug in _check_log_matching didn't validate against snapshoted node correctly. the previous code just didn't do what it was expected to do * improve virtraft logging * fix entry_pop in virtraft previously, entry_pop never ran during our virtraft tests, probably because without removing leader, we never have a situation where this is neccessary i.e. the only case virtraft can pop entries, is when we have a leader lose leadership and we have an entry pending and not committed. so when another node becomes leader, old leader's entries get popped. however, that has nothing to do with the "id" of the node that its effecting so trying to contorl it through that, makes no sense. * extra comment for fix reminder * ensure that we start with a term of 1 in virtraft, not 0. snapshot code fails if we have a snapshot term of 0 (explicitly returns an error if the term stored in snapshot is 0). Co-authored-by:
Yossi Gottlieb <yossigo@gmail.com>
-
- 27 Jul, 2021 1 commit
-
-
Shaya Potter authored
raft_get_last_log_term() is used for filling in vote requests, except it didn't match 100% with the logic in should_grant_vote * update test to prove that change works as needed previous test tested when we don't snapshot everything, but code was broken when we did. modified test tested only when we snapshot everything, now we do both in sequence. * use raft_get_last_log_term in __should_grant_vote() also modify __should_grant_vote to take a raft_server_t instead of raft_server_privat_t so its not constantly casting it to void.
-
- 26 Jul, 2021 1 commit
-
-
Shaya Potter authored
before we were able to promote a "ready" but not applied nonvoting node to a voting state, which means it would change the calculation as could vote for itself to be added. * fix tests that check for has_sufficient_logs because of a fix put in to not allow a node to be added until its "addition" as a non voter was comitted, that broke existing tests where that flag wasn't being set and testing that the nodes could be promoted * add a test that has_sufficient_logs will fail if addition not committed yet code before would add a node as a voter (via has_sufficient_logs) even if the initial non voter addition wasn't committed the test for this in the code actually tested after setting addition_committed. add a test that does the same without that flag being set and expects that has_sufficient_logs will not be set
-
- 19 Jul, 2021 1 commit
-
-
Yossi Gottlieb authored
-
- 12 Mar, 2020 2 commits
-
-
Yossi Gottlieb authored
The no-op entry gets committed as soon as a new leader is elected, in order to establish the commit index and prevent stale reads.
-
Yossi Gottlieb authored
This fixes an issue with virtraft2 which was not able to perform REMOVE_NODE when DEMOTE_NODE was applied. The previous fix of directly removing nodes was not aligned with how virtraft2 manages nodes.
-
- 10 Mar, 2020 3 commits
-
-
Yossi Gottlieb authored
-
Yossi Gottlieb authored
-
Yossi Gottlieb authored
The limit for enforcing a single uncommitted voting change must apply to remove node as well. It seems like it was left out considering only the case where it follows DEMOTE_NODE, but that's not really required.
-
- 19 Dec, 2018 2 commits
-
-
Yossi Gottlieb authored
-
Yossi Gottlieb authored
This makes it possible to request a consistent read without having to commit it as a log operation. For every read request an AE heartbeat is delivered and a quorum response is expected.
-
- 18 Dec, 2018 1 commit
-
-
Yossi Gottlieb authored
-
- 09 Dec, 2018 1 commit
-
-
Yossi Gottlieb authored
-
- 06 Dec, 2018 1 commit
-
-
Yossi Gottlieb authored
-
- 18 Nov, 2018 1 commit
-
-
Yossi Gottlieb authored
-
- 08 Oct, 2018 1 commit
-
-
Yossi Gottlieb authored
All nodes expect local should be removed when loading a snapshot, and any prior knowledge about them should be void.
-
- 27 Sep, 2018 2 commits
-
-
Yossi Gottlieb authored
Errors were ignored if node's match_idx==next_idx-1, I assume (??) as a precaution against silently feeding a node that is not monotonic. However this does not consider the case where send_appendentries() relies on snapshot_last_idx which may be greater than the node's index.
-
Yossi Gottlieb authored
Errors were ignored if node's match_idx==next_idx-1, I assume (??) as a precaution against silently feeding a node that is not monotonic. However this does not consider the case where send_appendentries() relies on snapshot_last_idx which may be greater than the node's index.
-
- 17 Aug, 2018 1 commit
-
-
Free Ekanayaka authored
The make-tests.sh script has been modified so that the test program exists non-zero in case of failures.
-
- 16 Aug, 2018 1 commit
-
-
Willem Thiart authored
-
- 15 Aug, 2018 2 commits
-
-
Willem Thiart authored
-
Yossi Gottlieb authored
-
- 14 Aug, 2018 2 commits
-
-
Willem Thiart authored
-
Willem Thiart authored
Less false positive deadlocks Logging to file Quiet mode Less strict partitions Include latest partitions in diagnostics
-
- 07 Aug, 2018 2 commits
-
-
Yossi Gottlieb authored
If specified when calling raft_begin_snapshot(), the library will not postpone applying entries during snapshots. This requires the FSM to provide full isolation between the snapshot and active state.
-
Yossi Gottlieb authored
If specified when calling raft_begin_snapshot(), the library will not postpone applying entries during snapshots. This requires the FSM to provide full isolation between the snapshot and active state.
-
- 20 Jun, 2018 2 commits
-
-
Willem Thiart authored
-
Yossi Gottlieb authored
-
- 13 Jun, 2018 2 commits
-
-
Willem Thiart authored
This fixes the virtraft checks.
-
Yossi Gottlieb authored
AE responses from a non-voting node can be ignored during a voting change, causing has_sufficient_logs for this node to never fire in the future.
-
- 11 Jun, 2018 2 commits
-
-
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.
-
Willem Thiart authored
-
- 08 Jun, 2018 1 commit
-
-
Jiale Zhi authored
-
- 07 Jun, 2018 1 commit
-
-
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.
-