private void updateState(final ClusterState clusterState,
                             final boolean testActiveNodes) {
        final String thisNodeName = nodeInfo.getThisNodeName();

        // Not ideal having to hit the service and db twice like this but the service no longer
        // exposes the Node object so limited options.
        final NodeService nodeService = nodeServiceProvider.get();
        final List<String> allNodeNames = Objects.requireNonNullElse(
                nodeService.findNodeNames(new FindNodeCriteria()),
                Collections.emptyList());

        final List<String> enabledNodesByPriority = Objects.requireNonNullElse(
                nodeService.getEnabledNodesByPriority(),
                Collections.emptyList());

        clusterState.setAllNodes(allNodeNames);

//        final Set<String> enabledNodes = new HashSet<>(enabledNodesByPriority);
        clusterState.setEnabledNodes(enabledNodesByPriority);

        // Create a set of active nodes, i.e. nodes we can contact at this
        // time.
        if (testActiveNodes) {
            updateActiveNodes(clusterState, thisNodeName, enabledNodesByPriority);

            updateMasterNode(enabledNodesByPriority);
        }

        clusterState.setUpdateTime(System.currentTimeMillis());
    }
Trigger a re-discover if the node saves
stroom-cluster/stroom-cluster-impl/src/main/java/stroom/cluster/impl/ClusterNodeManagerImpl.java