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

Commit c602204

Browse files
author
Mathieu Borderé
committed
snapshot: Configurations from snapshots are committed.
Signed-off-by: Mathieu Borderé <mathieu.bordere@canonical.com>
1 parent 2506d6e commit c602204

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/snapshot.c

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ int snapshotRestore(struct raft *r, struct raft_snapshot *snapshot)
4343
configurationClose(&r->configuration);
4444
r->configuration = snapshot->configuration;
4545
r->configuration_index = snapshot->configuration_index;
46+
/* The configuration in the snapshot is by definition committed. */
47+
r->configuration_uncommitted_index = 0;
4648
configurationTrace(r, &r->configuration, "configuration restore from snapshot");
4749

4850
r->commit_index = snapshot->index;

0 commit comments

Comments
 (0)