Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
RedisLabs Raft
Commits
699e87d3
Commit
699e87d3
authored
May 24, 2020
by
Yossi Gottlieb
Browse files
Fix: never revert term due to a snapshot.
parent
0990cf7b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/raft_server.c
View file @
699e87d3
...
...
@@ -1486,6 +1486,7 @@ int raft_begin_load_snapshot(
if (last_included_term == me->snapshot_last_term && last_included_index == me->snapshot_last_idx)
return RAFT_ERR_SNAPSHOT_ALREADY_LOADED;
if (me->current_term < last_included_term)
me->current_term = last_included_term;
me->voted_for = -1;
raft_set_state((raft_server_t*)me, RAFT_STATE_FOLLOWER);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment