Skip to content

Commit 4e75f3d

Browse files
committed
republish the cluster state if a node exists in the cluster
1 parent 0172eae commit 4e75f3d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,10 @@ private ClusterState handleJoinRequest(final DiscoveryNode node) {
454454
clusterService.submitStateUpdateTask("zen-disco-receive(from node[" + node + "])", new ClusterStateUpdateTask() {
455455
@Override public ClusterState execute(ClusterState currentState) {
456456
if (currentState.nodes().nodeExists(node.id())) {
457-
// no change, the node already exists in the cluster
457+
// the node already exists in the cluster
458458
logger.warn("received a join request for an existing node [{}]", node);
459-
return currentState;
459+
// still send a new cluster state, so it will be re published and possibly update the other node
460+
return ClusterState.builder().state(currentState).build();
460461
}
461462
return newClusterStateBuilder().state(currentState).nodes(currentState.nodes().newNode(node)).build();
462463
}

0 commit comments

Comments
 (0)