This is an automated email from the ASF dual-hosted git repository.

markap14 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
     new 6c2701a  Do not update status for stopping a deleted node
6c2701a is described below

commit 6c2701abef4ad3274399e946d60925be9bbecd22
Author: Sushil Kumar <susk...@microsoft.com>
AuthorDate: Thu Apr 23 21:07:42 2020 -0700

    Do not update status for stopping a deleted node
---
 .../nifi/cluster/coordination/node/NodeClusterCoordinator.java       | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/coordination/node/NodeClusterCoordinator.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/coordination/node/NodeClusterCoordinator.java
index e428046..717b8b4 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/coordination/node/NodeClusterCoordinator.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/coordination/node/NodeClusterCoordinator.java
@@ -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)) {

Reply via email to