Переглянути джерело

Extend election timer timeout to accommodate slower heartbeats.

Election timer timeout is now 50ms more than heartbeat interval.
Jing Yang 3 роки тому
батько
коміт
5667013a1d
1 змінених файлів з 2 додано та 2 видалено
  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 {