diff --git a/naming/src/main/java/com/alibaba/nacos/naming/raft/GlobalExecutor.java b/naming/src/main/java/com/alibaba/nacos/naming/raft/GlobalExecutor.java index 7e2af78d9..2ba9740ae 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/raft/GlobalExecutor.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/raft/GlobalExecutor.java @@ -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); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/raft/RaftPeer.java b/naming/src/main/java/com/alibaba/nacos/naming/raft/RaftPeer.java index c178c1644..4cb6134f5 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/raft/RaftPeer.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/raft/RaftPeer.java @@ -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() {