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
eb859a67
Unverified
Commit
eb859a67
authored
Mar 08, 2022
by
Ozan Tezcan
Committed by
GitHub
Mar 08, 2022
Browse files
Do not prevent election when snapshot is in progress (#86)
parent
0f2f98bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/raft_server.c
View file @
eb859a67
...
@@ -643,10 +643,7 @@ int raft_periodic(raft_server_t* me_, int msec_since_last_period)
...
@@ -643,10 +643,7 @@ int raft_periodic(raft_server_t* me_, int msec_since_last_period)
raft_update_quorum_meta
(
me_
,
quorum_id
);
raft_update_quorum_meta
(
me_
,
quorum_id
);
}
}
}
}
else
if
((
me
->
election_timeout_rand
<=
me
->
timeout_elapsed
||
me
->
timeout_now
)
&&
else
if
((
me
->
election_timeout_rand
<=
me
->
timeout_elapsed
||
me
->
timeout_now
))
/* Don't become the leader when building snapshots or bad things will
* happen when we get a client request */
!
raft_snapshot_is_in_progress
(
me_
))
{
{
int
e
=
raft_election_start
(
me_
);
int
e
=
raft_election_start
(
me_
);
if
(
0
!=
e
)
if
(
0
!=
e
)
...
...
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