From 7f2bda29d968694f62c7e776839efb448215f6f9 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Tue, 19 Jul 2016 15:57:05 -0400 Subject: [PATCH] NIFI-2289: Ensure that we include Node ID's of all nodes when finding cluster coordinator, even if the node is currently still connecting or has not yet joined the cluster, which ccan be the case if all nodes in the cluster are restarting at the same time. This closes #681 Signed-off-by: jpercivall --- .../nifi/cluster/coordination/node/NodeClusterCoordinator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5a74301669..04f8dfaf3e 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 @@ -532,7 +532,7 @@ public class NodeClusterCoordinator implements ClusterCoordinator, ProtocolHandl return null; } - final Set connectedNodeIds = getNodeIdentifiers(NodeConnectionState.CONNECTED); + final Set connectedNodeIds = getNodeIdentifiers(); final NodeIdentifier electedNodeId = connectedNodeIds.stream() .filter(nodeId -> nodeId.getSocketAddress().equals(electedNodeHostname) && nodeId.getSocketPort() == electedNodePort) .findFirst()