private boolean resyncLocallyCachedState() {
        boolean didWork = false;
        // Let non-master state gatherers update wanted states once in a while, so states generated and shown are close to valid.
        if ( ! isMaster && cycleCount % 100 == 0) {
            didWork = metricUpdater.forWork("loadWantedStates", () -> database.loadWantedStates(databaseContext));
            didWork |= metricUpdater.forWork("loadStartTimestamps", () -> database.loadStartTimestamps(cluster));
        }
        // If we have new slobrok information, update our cluster.
        didWork |= metricUpdater.forWork("updateCluster", () -> nodeLookup.updateCluster(cluster, this));

        // Send getNodeState requests to zero or more nodes.
        didWork |= metricUpdater.forWork("sendMessages", () -> stateGatherer.sendMessages(cluster, communicator, this));
        // Important: timer events must use a state with pending changes visible, or they might
        // trigger edge events multiple times.
        didWork |= metricUpdater.forWork(
                "watchTimers",
                () -> stateChangeHandler.watchTimers(cluster, stateVersionTracker.getLatestCandidateState().getClusterState(), this));

        didWork |= metricUpdater.forWork("recomputeClusterStateIfRequired", this::recomputeClusterStateIfRequired);

        if ( ! isStateGatherer) {
            if ( ! isMaster) {
                eventLog.add(new ClusterEvent(ClusterEvent.Type.MASTER_ELECTION, "This node just became node state gatherer as we are fleetcontroller master candidate.", timer.getCurrentTimeInMillis()));
                // Update versions to use so what is shown is closer to what is reality on the master
                stateVersionTracker.setVersionRetrievedFromZooKeeper(database.getLatestSystemStateVersion());
                stateChangeHandler.setStateChangedFlag();
            }
        }
        isStateGatherer = true;
        return didWork;
    }
A "consolidated" cluster state is guaranteed to have up-to-date information on which nodes are
up or down even when the whole cluster is down. The regular, published cluster state is not
normally updated to reflect node events when the cluster is down.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java