Skip to content

Commit

Permalink
raft: Move raft_reset_ping_timer() out of the loop.
Browse files Browse the repository at this point in the history
Fixes: commit 5a9b53a ("ovsdb raft: Fix duplicated transaction execution when leader failover.")
Signed-off-by: Han Zhou <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
hzhou8 authored and blp committed Aug 21, 2019
1 parent 0175bdd commit f4bef8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovsdb/raft.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,8 +1816,8 @@ raft_run(struct raft *raft)
&& now - cmd->timestamp > ELECTION_BASE_MSEC * 2) {
raft_command_complete(raft, cmd, RAFT_CMD_TIMEOUT);
}
raft_reset_ping_timer(raft);
}
raft_reset_ping_timer(raft);
}

/* Do this only at the end; if we did it as soon as we set raft->left or
Expand Down

0 comments on commit f4bef8b

Please sign in to comment.