Do not update status for stopping a deleted node

This commit is contained in:
Sushil Kumar 2020-04-23 21:07:42 -07:00 committed by markap14
parent cd10435b9f
commit 6c2701abef
1 changed files with 5 additions and 0 deletions

View File

@ -1059,6 +1059,11 @@ public class NodeClusterCoordinator implements ClusterCoordinator, ProtocolHandl
final NodeConnectionStatus oldStatus = nodeStatuses.get(statusChangeMessage.getNodeId().getId());
if (oldStatus == null && updatedStatus.getState() == NodeConnectionState.DISCONNECTED ) {
// There is no need to tell that node is getting disconnected if there was no status earlier.
return;
}
// Either remove the value from the map or update the map depending on the connection state
if (statusChangeMessage.getNodeConnectionStatus().getState() == NodeConnectionState.REMOVED) {
if (removeNodeConditionally(nodeId, oldStatus)) {