- 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 2 commits
-
-
Shaya Potter authored
current_leader points to the node object corresponding to the leader node. But we are about to free() it. to prevent an access after free, have to unset it here.
-
Yossi Gottlieb authored
-
- 23 May, 2021 1 commit
-
-
Shaya Potter authored
Co-authored-by:
Yossi Gottlieb <yossigo@gmail.com>
-
- 11 May, 2021 1 commit
-
-
Shaya Potter authored
Before this commit, active and voting flags were ignored resulting with a result that does not agree with `raft_get_num_voting_nodes()` and an assertion. This could be seen when a leader node gets removed while a read operation is in progress.
-
- 29 May, 2020 1 commit
-
-
Yossi Gottlieb authored
Fix for a special case where quorum reads are attempted on a single node cluster before anything else was written.
-
- 27 May, 2020 1 commit
-
-
Yossi Gottlieb authored
-
- 26 May, 2020 1 commit
-
-
Yossi Gottlieb authored
If snapshot is on the same term, avoid resetting voted_for to prevent an additional vote. If snapshot is on a newer term, reset and persist term and vote.
-
- 24 May, 2020 1 commit
-
-
Yossi Gottlieb authored
-
- 16 Apr, 2020 1 commit
-
-
Yossi Gottlieb authored
-
- 23 Mar, 2020 2 commits
-
-
Yossi Gottlieb authored
During joint consensus, we need to deliver entries to demoted and removed nodes so they can gracefully shut down. This also fixes an issue with raft_send_appendentries_all() which aborted on first delivery error, creating artificial cluster partitions. This problem is further aggravated when attempting to deliver to inactive nodes.
-
Yossi Gottlieb authored
Turns out documentation is not up to date regarding the process of node removal, and it the current implementation assumes a two-phase process is always required (i.e. DEMOTE followed by REMOVE).
-
- 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 4 commits
-
-
Yossi Gottlieb authored
-
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.
-
- 31 Dec, 2018 1 commit
-
-
Yossi Gottlieb authored
-
- 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
-
- 13 Dec, 2018 1 commit
-
-
Yossi Gottlieb authored
-
- 11 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
-
- 16 Oct, 2018 1 commit
-
-
Yossi Gottlieb authored
This is probably most common when loading a snapshot. Currently it is only possibly to free allocated entry memory on log_pop and log_poll, but neither are called on log_reset(). This is a quick and non-breaking fix. A better but not backward compatible option can be to have a free function callback as part of the entry itself (automatically called when needed, not by log_pop or log_poll). This would also make it easier to avoid redundant buffer allocs/copies on the app side.
-
- 08 Oct, 2018 2 commits
-
-
Yossi Gottlieb authored
-
Yossi Gottlieb authored
All nodes expect local should be removed when loading a snapshot, and any prior knowledge about them should be void.
-
- 06 Oct, 2018 3 commits
- 04 Oct, 2018 2 commits
-
-
Yossi Gottlieb authored
To clarify, the desired behavior is: 1) Avoid false assertions. 2) Silently ignore AE responses which are stale or not monotonic (i.e. current index < match index).
-
Yossi Gottlieb authored
To clarify, the desired behavior is: 1) Avoid false assertions. 2) Silently ignore AE responses which are stale or not monotonic (i.e. current index < match index).
-
- 27 Sep, 2018 4 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
-
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
-