- 22 Aug, 2022 1 commit
-
-
Ozan Tezcan authored
- raft_load_snapshot_f(): Changed order of arguments term and index to be inline with raft_begin_load_snapshot(). - Refactored raft_begin_load_snapshot(). Now, inside this function, current server's node flags are cleared. Previously, application had to take care of it. e.g Application had to clear inactive flag on a snapshot. - Added raft_restore_snapshot() to let libraft know that application has loaded a snapshot.
-
- 19 Jun, 2022 1 commit
-
-
Ozan Tezcan authored
Throttle operations if it takes longer than request timeout
-
- 19 May, 2022 1 commit
-
-
Ozan Tezcan authored
Simplify read request processing
-
- 26 Apr, 2022 1 commit
-
-
Ozan Tezcan authored
Add raft_config() function for configuration
-
- 03 Apr, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 30 Mar, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 24 Mar, 2022 1 commit
-
-
Ozan Tezcan authored
Delete private typedefs, use namespace raft_ for exported symbols
-
- 07 Feb, 2022 1 commit
-
-
Ozan Tezcan authored
Add support for async disk flush, backpressure and batching
-
- 15 Nov, 2021 1 commit
-
-
Ozan Tezcan authored
Added snapshot RPC to support large state machines.
-
- 11 Nov, 2021 1 commit
-
-
Shaya Potter authored
* print out table with better labels * print out a nodes voting peers (can help debugging based on partitions) * fix node "status" (connected/connecting/disconnected...) in case of an entry pop of a remove entry
-
- 23 Sep, 2021 1 commit
-
-
Ozan Tezcan authored
Define separate callback function for node id retrieval
-
- 22 Sep, 2021 1 commit
-
-
Shaya Potter authored
* fix read queue test to be more accurate 1) each server's set of nodes, keeps the max msg_id its seen from that node when that node has been later 1a) because of this get_max_seen now operates on a server's nodes, not on the server itself b 2) virtraft encodes the leader id into the "arg" (with a user redefinable multiplier) it sends as part of the callback, so when we get the callback, we can know what leader its for and check its voters for correctness.
-
- 14 Sep, 2021 1 commit
-
-
Ozan Tezcan authored
* prevote implementation
-
- 12 Sep, 2021 1 commit
-
-
Shaya Potter authored
* add a read_queue test to virtraft every iteration we push a read_queue request and the handler and an we pass to it set a variable on calling. we can use this to make sure that the read_queue doesn't get too far from the iteration. i.e. we pass the leader's msg_id and can check to ensure that leader's msg_id doesn't get too far from the msg_id (variable) we see in read_queue test this is analog to the current log applying deadlock test. * implements msg_id checking in virtraft for verification of read_queue requests When we pop an entry off the read_queue with the can_read flag, we verify across all nodes that the majority of nodes have accepted from the leader a msg_id past what this read_queue entry needs. the problem with this is, that until now, msg_id was private to each server instance and has no relevance to the followre nodes except to include it back in response. we change that to have the followers store the max msg_id they've seen from their current leader using that, in the read_queue_handler we can verify that the leader's voting nodes have a quorum past the msg_id variable that the handler will return to ensure that this read_queue handler call is correct.
-
- 09 Sep, 2021 1 commit
-
-
Ozan Tezcan authored
Unknown node handling
-
- 22 Aug, 2021 1 commit
-
-
Shaya Potter authored
before, purposefully, virtraft had simplex partitions (i.e. traffic was only blocked from flowing one way). however, for read_queue tests and for correctness of them, we have to ensure that its duplex (i.e. neither side can talk to each other). otherwise, we can end up in a situation, where leader heartbeated every node, the majority of the nodes got the ping, but the majority couldn't reply back. If there's a bug in libraft's calculation, by simply looking at the other nodes, we would think everything is fine, as they got the heartbeat
-
- 18 Aug, 2021 1 commit
-
-
Ozan Tezcan authored
Implemented check-quorum
-
- 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>
-
- 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 1 commit
-
-
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 1 commit
-
-
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.
-
- 09 Dec, 2018 1 commit
-
-
Yossi Gottlieb authored
-
- 06 Dec, 2018 1 commit
-
-
Yossi Gottlieb authored
-
- 15 Aug, 2018 1 commit
-
-
Willem Thiart 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
-
- 20 Jun, 2018 1 commit
-
-
Willem Thiart authored
-
- 11 Jun, 2018 1 commit
-
-
Willem Thiart authored
-