Pārlūkot izejas kodu

Extend election timer timeout to accommodate slower heartbeats.

Election timer timeout is now 50ms more than heartbeat interval.
Jing Yang 3 gadi atpakaļ
vecāks
revīzija
5667013a1d
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/election.rs

+ 2 - 2
src/election.rs

@@ -21,8 +21,8 @@ pub(crate) struct ElectionState {
     signal: Condvar,
 }
 
-const ELECTION_TIMEOUT_BASE_MILLIS: u64 = 150;
-const ELECTION_TIMEOUT_VAR_MILLIS: u64 = 250;
+const ELECTION_TIMEOUT_BASE_MILLIS: u64 = 200;
+const ELECTION_TIMEOUT_VAR_MILLIS: u64 = 200;
 impl ElectionState {
     pub(crate) fn create() -> Self {
         Self {