- 12 Sep, 2022 2 commits
-
-
Ozan Tezcan authored
Added a helper function to get string representation of an error code.
-
Ozan Tezcan authored
Refactor callback comments. - Regroup related callbacks. - Move optional callbacks to the bottom and indicate "(optional)".
-
- 05 Sep, 2022 1 commit
-
-
Ozan Tezcan authored
Revert change for sending timeout message. Introduced by https://github.com/RedisLabs/raft/pull/127. This PR deleted the check to prevent sending duplicate timeout messages.
-
- 04 Sep, 2022 1 commit
-
-
Ozan Tezcan authored
Propagate error codes from persist_metadata() callback
-
- 30 Aug, 2022 1 commit
-
-
Ozan Tezcan authored
Refactor debug logging and change log callback e.g: 19 --> 13, sent snapshot_resp id:27712, t:24, s:1, o:4096, lc:0 14 --> 17, sent requestvote_req pv:1, t:25, ci:14, lli:6848, llt:23 14 <-- 17, recv requestvote_resp pv:1, t:25, rt:24, vg:0 Breaking changes: raft_log_f() callback will not pass node_id_t anymore. Sender and receiver will be part of the log line as you can see above.
-
- 29 Aug, 2022 3 commits
-
-
Ozan Tezcan authored
Simplied pop callback. Previously, libraft was passing a callback(raft_entry_notify_f) to the pop callback. The application was supposed to call that callback for each removed entry. Libraft can loop over the entries and call the required functions itself. So, we can delete raft_entry_notify_f from the pop callback just to simplify API. In addition to that, this PR removes raft_pop_entry() function which doesn't have a use-case, as far as I can see. We can use raft_delete_entry_from_idx(me, raft_get_current_idx()) instead if required.
-
Ozan Tezcan authored
Add raft_get_last_applied_term()
-
Ozan Tezcan authored
Fix style issues in raft_log.c raft_node.c and raft_server_properties.c
-
- 28 Aug, 2022 1 commit
-
-
Ozan Tezcan authored
In https://github.com/RedisLabs/raft/pull/118, we introduced raft_restore_snapshot() which makes raft_set_snapshot_metadata() obsolete.
-
- 25 Aug, 2022 2 commits
-
-
Ozan Tezcan authored
-
Ozan Tezcan authored
Configuration changes are special in Raft. They take effect whenever the related log entries are appended. On a restart, we should go over the log entries and rebuild the configuration. Adding raft_restore_log() function for this purpose. Overall, on a restart, application should do: Load the snapshot and call raft_restore_snapshot() Load the log entries and call raft_restore_log() Read the metadata file and call raft_restore_metadata().
-
- 23 Aug, 2022 3 commits
-
-
Yehoshua (Josh) Hershberg authored
-
Ozan Tezcan authored
-
Ozan Tezcan authored
Combine raft_persist_vote_f and raft_persist_term_f into a single callback: raft_persist_metadata_f. Users should persist vote and term into a single metadata file. After a restart, application should call raft_restore_metadata() to restore vote and term
-
- 22 Aug, 2022 2 commits
-
-
Ozan Tezcan authored
Use typedef instead of the actual type
-
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.
-
- 18 Aug, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 16 Aug, 2022 3 commits
-
-
Ozan Tezcan authored
In #106, we introduced raft_time_t which is at least 8 bytes. election_timeout_rand should use this type to prevent slicing.
-
Ozan Tezcan authored
Leftover after #105
-
Ozan Tezcan authored
Delete stale HAVE_FUNC_LOG guard Log callback is already optional. Pre-processor guard is unnecessary.
-
- 08 Aug, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 21 Jul, 2022 2 commits
-
-
Hanna Fadida authored
-
Hanna Fadida authored
- update .gitignore
-
- 07 Jul, 2022 2 commits
-
-
Ozan Tezcan authored
Throttle operations early not to block server Introduced throttling in #106. If execution of operations take as much as request-timeout, it means this server will not generate responses on time for the existing requests. This is causing extra elections. I've changed deadline as 'now + request_timeout / 2', giving server some room for other operations and enough time to send responses.
-
Ozan Tezcan authored
-
- 05 Jul, 2022 1 commit
-
-
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.
-
- 30 Jun, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 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
-
- 15 May, 2022 1 commit
-
-
Ozan Tezcan authored
Fix next_idx and next_msgid usages
-
- 02 May, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 26 Apr, 2022 1 commit
-
-
Ozan Tezcan authored
Add raft_config() function for configuration
-
- 25 Apr, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 18 Apr, 2022 1 commit
-
-
Ozan Tezcan authored
Refactor
-
- 06 Apr, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 04 Apr, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 03 Apr, 2022 1 commit
-
-
Ozan Tezcan authored
-
- 30 Mar, 2022 2 commits
-
-
Ozan Tezcan authored
-
Ozan Tezcan authored
-
- 24 Mar, 2022 1 commit
-
-
Ozan Tezcan authored
Delete private typedefs, use namespace raft_ for exported symbols
-