private void add(ApplicationId application, ClusterSpec.Id cluster, ClusterMetricSnapshot snapshot) {
        var key = new Pair<>(application, cluster);
        var existing = clusterTimeseries.computeIfAbsent(key, __ -> new ClusterTimeseries(cluster, new ArrayList<>()));
        clusterTimeseries.put(key, existing.add(snapshot));
    }
Lock all access for now since we modify lists inside a map
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/MemoryMetricsDb.java