Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
RedisLabs Raft
Commits
eaa9e5cd
Commit
eaa9e5cd
authored
May 17, 2018
by
skypexu
Committed by
Willem
May 17, 2018
Browse files
Check snapshot term. (#61)
Fix raft_begin_load_snapshot last_included_term handling
parent
aaa5ff81
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/raft_server.c
View file @
eaa9e5cd
...
@@ -1280,7 +1280,7 @@ int raft_begin_load_snapshot(
...
@@ -1280,7 +1280,7 @@ int raft_begin_load_snapshot(
if
(
last_included_index
==
-
1
)
if
(
last_included_index
==
-
1
)
return
-
1
;
return
-
1
;
if
(
last_included_index
==
0
||
last_included_
index
==
0
)
if
(
last_included_index
==
0
||
last_included_
term
==
0
)
return
-
1
;
return
-
1
;
/* loading the snapshot will break cluster safety */
/* loading the snapshot will break cluster safety */
...
...
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