Unverified Commit 0cf0ee6b authored by Ozan Tezcan's avatar Ozan Tezcan Committed by GitHub
Browse files

Documentation fix (#145)



Documentation fix
Co-authored-by: default avatarHanna Fadida <hanna.fadida@redislabs.com>
parent 63c09185
...@@ -292,10 +292,7 @@ struct config { ...@@ -292,10 +292,7 @@ struct config {
}; };
.... ....
void app_configure_from_snapshot(raft_server_t *r, void app_configure_from_snapshot(raft_server_t *r, struct config *head)
struct config *head,
raft_term_t last_applied_term
raft_index_t last_applied_index)
{ {
struct config *cfg = head; struct config *cfg = head;
...@@ -313,7 +310,14 @@ void app_configure_from_snapshot(raft_server_t *r, ...@@ -313,7 +310,14 @@ void app_configure_from_snapshot(raft_server_t *r,
} }
cfg = cfg->next; cfg = cfg->next;
} }
}
void app_restore_snapshot(raft_server_t *r,
struct config *head,
raft_term_t last_applied_term
raft_index_t last_applied_index)
{
app_configure_from_snapshot(r, head);
raft_restore_snapshot(r, last_applied_term, last_applied_index); raft_restore_snapshot(r, last_applied_term, last_applied_index);
} }
...@@ -348,7 +352,8 @@ void app_restore_raft_library() ...@@ -348,7 +352,8 @@ void app_restore_raft_library()
// extracted node configuration list, // extracted node configuration list,
// extracted last_applied_term and last_applied_index // extracted last_applied_term and last_applied_index
// See the example implementation above for this function. // See the example implementation above for this function.
app_configure_from_snapshot(r, cfg, last_applied_term, last_applied_index); app_configure_from_snapshot(r, cfg);
raft_restore_snapshot(r, snapshot_last_term, snapshot_last_index);
app_load_logs_to_impl(); // Load log entries in your log implementation app_load_logs_to_impl(); // Load log entries in your log implementation
raft_restore_log(); raft_restore_log();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment