Skip to content
Snippets Groups Projects
Commit 9fd17dad authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon: Committed by Georgy Moshkin
Browse files

fix: bug in negated conditions

parent 3946ac00
No related branches found
No related tags found
1 merge request!179test: deploy a cluster of 60 instances
Pipeline #9118 passed
......@@ -702,10 +702,10 @@ fn raft_main_loop(
// - <https://github.com/tikv/raft-rs/blob/v0.6.0/src/raft.rs#L2058>
// - <https://github.com/tikv/raft-rs/blob/v0.6.0/src/raft.rs#L2323>
let leader_exists = raw_node.raft.leader_id == INVALID_ID;
let leader_doesnt_exist = raw_node.raft.leader_id == INVALID_ID;
let term_just_started = raw_node.raft.state == RaftStateRole::Leader
&& !raw_node.raft.commit_to_current_term();
if !leader_exists || term_just_started {
if leader_doesnt_exist || term_just_started {
notify.notify_err(RaftError::ProposalDropped);
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment