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 2ba9740ae..d35ef1397 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 @@ -21,7 +21,7 @@ import java.util.concurrent.*; * @author nacos */ public class GlobalExecutor { - public static final long HEARTBEAT_INTVERAL_MS = TimeUnit.SECONDS.toMillis(5L); + public static final long HEARTBEAT_INTERVAL_MS = TimeUnit.SECONDS.toMillis(5L); public static final long LEADER_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(15L); @@ -29,7 +29,7 @@ public class GlobalExecutor { public static final long TICK_PERIOD_MS = TimeUnit.MILLISECONDS.toMillis(500L); - public static final long ADDRESS_SERVER_UPDATE_INTVERAL_MS = TimeUnit.SECONDS.toMillis(5L); + public static final long ADDRESS_SERVER_UPDATE_INTERVAL_MS = TimeUnit.SECONDS.toMillis(5L); private static ScheduledExecutorService executorService = new ScheduledThreadPoolExecutor(2, new ThreadFactory() { @Override diff --git a/naming/src/main/java/com/alibaba/nacos/naming/raft/RaftCore.java b/naming/src/main/java/com/alibaba/nacos/naming/raft/RaftCore.java index 38caa21a1..9609986b1 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/raft/RaftCore.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/raft/RaftCore.java @@ -120,7 +120,7 @@ public class RaftCore { GlobalExecutor.register(new MasterElection()); GlobalExecutor.register1(new HeartBeat()); - GlobalExecutor.register(new AddressServerUpdater(), GlobalExecutor.ADDRESS_SERVER_UPDATE_INTVERAL_MS); + GlobalExecutor.register(new AddressServerUpdater(), GlobalExecutor.ADDRESS_SERVER_UPDATE_INTERVAL_MS); if (peers.size() > 0) { if (lock.tryLock(INIT_LOCK_TIME_SECONDS, TimeUnit.SECONDS)) { @@ -132,7 +132,7 @@ public class RaftCore { } Loggers.RAFT.info("timer started: leader timeout ms: " + GlobalExecutor.LEADER_TIMEOUT_MS - + "; heart-beat timeout ms: " + GlobalExecutor.HEARTBEAT_INTVERAL_MS); + + "; heart-beat timeout ms: " + GlobalExecutor.HEARTBEAT_INTERVAL_MS); } public static List getListeners() { 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 4cb6134f5..e91fe924d 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 @@ -34,7 +34,7 @@ public class RaftPeer { public volatile long leaderDueMs = RandomUtils.nextLong(0, GlobalExecutor.LEADER_TIMEOUT_MS); - public volatile long heartbeatDueMs = RandomUtils.nextLong(0, GlobalExecutor.HEARTBEAT_INTVERAL_MS); + public volatile long heartbeatDueMs = RandomUtils.nextLong(0, GlobalExecutor.HEARTBEAT_INTERVAL_MS); public State state = State.FOLLOWER; @@ -43,7 +43,7 @@ public class RaftPeer { } public void resetHeartbeatDue() { - heartbeatDueMs = GlobalExecutor.HEARTBEAT_INTVERAL_MS; + heartbeatDueMs = GlobalExecutor.HEARTBEAT_INTERVAL_MS; } public enum State {