diff --git a/core/src/main/java/com/alibaba/nacos/core/distributed/raft/JRaftServer.java b/core/src/main/java/com/alibaba/nacos/core/distributed/raft/JRaftServer.java index e3073e421..f59463b2b 100644 --- a/core/src/main/java/com/alibaba/nacos/core/distributed/raft/JRaftServer.java +++ b/core/src/main/java/com/alibaba/nacos/core/distributed/raft/JRaftServer.java @@ -497,17 +497,17 @@ public class JRaftServer { Configuration oldConf = instance.getConfiguration(groupName); String oldLeader = Optional.ofNullable(instance.selectLeader(groupName)).orElse(PeerId.emptyPeer()) .getEndpoint().toString(); - status = instance.refreshConfiguration(this.cliClientService, groupName, rpcRequestTimeoutMs); - if (!status.isOk()) { - Loggers.RAFT - .error("Fail to refresh route configuration for group : {}, status is : {}", groupName, status); - } // fix issue #3661 https://github.com/alibaba/nacos/issues/3661 status = instance.refreshLeader(this.cliClientService, groupName, rpcRequestTimeoutMs); if (!status.isOk()) { Loggers.RAFT .error("Fail to refresh leader for group : {}, status is : {}", groupName, status); } + status = instance.refreshConfiguration(this.cliClientService, groupName, rpcRequestTimeoutMs); + if (!status.isOk()) { + Loggers.RAFT + .error("Fail to refresh route configuration for group : {}, status is : {}", groupName, status); + } } catch (Exception e) { Loggers.RAFT.error("Fail to refresh raft metadata info for group : {}, error is : {}", groupName, e); }