Skip to content

Commit

Permalink
Documentation fix (#145)
Browse files Browse the repository at this point in the history
Documentation fix

Co-authored-by: Hanna Fadida <[email protected]>
  • Loading branch information
tezc and fadidahanna authored Sep 22, 2022
1 parent 63c0918 commit 0cf0ee6
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docs/Using.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,7 @@ struct config {
};
....

void app_configure_from_snapshot(raft_server_t *r,
struct config *head,
raft_term_t last_applied_term
raft_index_t last_applied_index)
void app_configure_from_snapshot(raft_server_t *r, struct config *head)
{
struct config *cfg = head;

Expand All @@ -313,7 +310,14 @@ void app_configure_from_snapshot(raft_server_t *r,
}
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);
}

Expand Down Expand Up @@ -348,7 +352,8 @@ void app_restore_raft_library()
// extracted node configuration list,
// extracted last_applied_term and last_applied_index
// 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
raft_restore_log();
Expand Down

0 comments on commit 0cf0ee6

Please sign in to comment.