Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
TMP: fix jepsen
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Borderé committed Jan 6, 2023
1 parent 6fd1852 commit 81421f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/start.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ static int restoreEntries(struct raft *r,
goto err;
}
r->last_stored++;
if (entry->type == RAFT_CHANGE) {
/* Only take configurations into account that are newer than the
* configuration restored from the snapshot. */
if (entry->type == RAFT_CHANGE && r->last_stored > r->configuration_index) {
prev_conf_index = last_conf_index;
last_conf = entry;
last_conf_index = r->last_stored;
Expand Down

0 comments on commit 81421f7

Please sign in to comment.