commit
d0517ad499
@ -25,7 +25,7 @@ public class GlobalExecutor {
|
||||
|
||||
public static final long LEADER_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(15L);
|
||||
|
||||
public static final long RAMDOM_MS = TimeUnit.SECONDS.toMillis(5L);
|
||||
public static final long RANDOM_MS = TimeUnit.SECONDS.toMillis(5L);
|
||||
|
||||
public static final long TICK_PERIOD_MS = TimeUnit.MILLISECONDS.toMillis(500L);
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class RaftPeer {
|
||||
public State state = State.FOLLOWER;
|
||||
|
||||
public void resetLeaderDue() {
|
||||
leaderDueMs = GlobalExecutor.LEADER_TIMEOUT_MS + RandomUtils.nextLong(0, GlobalExecutor.RAMDOM_MS);
|
||||
leaderDueMs = GlobalExecutor.LEADER_TIMEOUT_MS + RandomUtils.nextLong(0, GlobalExecutor.RANDOM_MS);
|
||||
}
|
||||
|
||||
public void resetHeartbeatDue() {
|
||||
|
Loading…
Reference in New Issue
Block a user