소스 검색

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 {