mirror of https://github.com/apache/nifi.git
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 <joepercivall@yahoo.com>
This commit is contained in:
parent
39a4d84a62
commit
7f2bda29d9
|
@ -532,7 +532,7 @@ public class NodeClusterCoordinator implements ClusterCoordinator, ProtocolHandl
|
|||
return null;
|
||||
}
|
||||
|
||||
final Set<NodeIdentifier> connectedNodeIds = getNodeIdentifiers(NodeConnectionState.CONNECTED);
|
||||
final Set<NodeIdentifier> connectedNodeIds = getNodeIdentifiers();
|
||||
final NodeIdentifier electedNodeId = connectedNodeIds.stream()
|
||||
.filter(nodeId -> nodeId.getSocketAddress().equals(electedNodeHostname) && nodeId.getSocketPort() == electedNodePort)
|
||||
.findFirst()
|
||||
|
|
Loading…
Reference in New Issue