Skip to content

Commit

Permalink
[ISSUE alibaba#4925] correct the member's state when the cluster info…
Browse files Browse the repository at this point in the history
…rmation changed
  • Loading branch information
MajorHe1 committed Feb 24, 2021
1 parent fe1d064 commit 6dad63d
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 6dad63d

Please sign in to comment.