Skip to content

Commit

Permalink
[ISSUE #4925] correct the member's state when the cluster information…
Browse files Browse the repository at this point in the history
… changed (#4948)
  • Loading branch information
MajorHe1 authored Mar 1, 2021
1 parent fe1d064 commit 4191286
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,14 @@ synchronized boolean memberChange(Collection<Member> members) {

if (!serverList.containsKey(address)) {
hasChange = true;
// If the cluster information in cluster.conf or address-server has been changed,
// while the corresponding nacos-server has not been started yet, the member's state
// should be set to DOWN. If the corresponding nacos-server has been started, the
// member's state will be set to UP after detection in a few seconds.
member.setState(NodeState.DOWN);
} else {
//fix issue # 4925
member.setState(serverList.get(address).getState());
}

// Ensure that the node is created only once
Expand Down

0 comments on commit 4191286

Please sign in to comment.