markap14 commented on code in PR #6779: URL: https://github.com/apache/nifi/pull/6779#discussion_r1063739074
########## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java: ########## @@ -6261,8 +6261,8 @@ private Set<String> getRoles(final NodeIdentifier nodeId) { final String nodeAddress = nodeId.getSocketAddress() + ":" + nodeId.getSocketPort(); for (final String roleName : ClusterRoles.getAllRoles()) { - final String leader = leaderElectionManager.getLeader(roleName); - if (leader == null) { + final Optional<String> leader = leaderElectionManager.getLeader(roleName); Review Comment: The change to `Optional<String>` here means that below, in line 6269, we are calling `leader.equals(nodeAddress)` which compares a `String` to an `Optional<String>` - need to ensure that we call `get()` first. As-is, the cluster page shows the nodes are connected but doesn't show which is Cluster Coordinator and which is primary node (though the nodes do appear to function in those roles properly). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org