private void updateActiveNodes(final ClusterState clusterState,
                                   final String thisNodeName,
                                   final List<String> enabledNodesByPriority) {
        // Only retain active nodes that are currently enabled.
        clusterState.retainEnabledActiveNodes(enabledNodesByPriority);

        // Now loop over all the enabled nodes and try and ping them asynchronously
        // updating the cluster state as we go
        for (final String nodeName : enabledNodesByPriority) {
            if (nodeName.equals(thisNodeName)) {
                // local node no need to ping
                clusterState.addEnabledActiveNode(nodeName);
            } else {
                final Runnable runnable = taskContextFactory.context(
                        "Pinging node " + nodeName,
                        taskContext -> {
                            taskContext.info(() -> "Pinging node " + nodeName);
                            try {
                                final Long responseMs = nodeResource.ping(nodeName);
                                LOGGER.debug(() -> "Got ping response in " +
                                                   ModelStringUtil.formatDurationString(responseMs));
                                clusterState.addEnabledActiveNode(nodeName);

                            } catch (final RuntimeException e) {
                                LOGGER.warn("discover() - unable to contact {} - {}", nodeName, e.getMessage());
                                clusterState.removeEnabledActiveNode(nodeName);
                            }
                            // Whatever happened update the master node state based on the current picture
                            // of enabled and active nodes and priority order
                            updateMasterNode(enabledNodesByPriority);
                        });
                CompletableFuture.runAsync(runnable, executor);
            }
        }
    }
Trigger a re-discover if the node saves
stroom-cluster/stroom-cluster-impl/src/main/java/stroom/cluster/impl/ClusterNodeManagerImpl.java