public int getLatestSystemStateVersion() {
        fleetControllerContext.log(logger, Level.FINE, () -> "Retrieving latest system state version.");
        synchronized (databaseMonitor) {
            if (database != null) {
                currentlyStored.lastSystemStateVersion = database.retrieveLatestSystemStateVersion();
            }
        }
        Integer version = currentlyStored.lastSystemStateVersion;
        if (version == null) {
            fleetControllerContext.log(logger, Level.WARNING, "Failed to retrieve latest system state version from ZooKeeper. Returning version 0.");
            return 0; // FIXME "fail-oblivious" is not a good error handling mode for such a critical component!
        }
        return version;
    }
This is called to attempt the next task against ZooKeeper we want to try.

@return true if we did or attempted any work.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/DatabaseHandler.java