NIFI-9893 - Ensure orderly cluster node removal on node delete via UI (#5946)

This commit is contained in:
greyp9 2022-04-13 13:44:28 -04:00 committed by GitHub
parent 5ec02c3464
commit 3034f2637a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -613,11 +613,12 @@ public class NodeClusterCoordinator implements ClusterCoordinator, ProtocolHandl
@Override
public void removeNode(final NodeIdentifier nodeId, final String userDn) {
// Remove the node from the cluster state before any notifications are sent to the cluster participants. This
// ensures that potential communication failures do not cause the operation to fail.
removeNode(nodeId);
storeState();
reportEvent(nodeId, Severity.INFO, "User " + userDn + " requested that node be removed from cluster");
notifyOthersOfNodeStatusChange(new NodeConnectionStatus(nodeId, NodeConnectionState.REMOVED));
removeNode(nodeId);
storeState();
}
private void onNodeRemoved(final NodeIdentifier nodeId) {